mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Add Jenkins buildscript for pull-building.
This commit is contained in:
89
dm.sh
Normal file
89
dm.sh
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
|
||||
dmepath=""
|
||||
retval=1
|
||||
|
||||
for var
|
||||
do
|
||||
if [[ $var != -* && $var == *.dme ]]
|
||||
then
|
||||
dmepath=`echo $var | sed -r 's/.{4}$//'`
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $dmepath == "" ]]
|
||||
then
|
||||
echo "No .dme file specified, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -a $dmepath.mdme ]]
|
||||
then
|
||||
rm $dmepath.mdme
|
||||
fi
|
||||
|
||||
cp $dmepath.dme $dmepath.mdme
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
echo "Failed to make modified dme, aborting."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
for var
|
||||
do
|
||||
arg=`echo $var | sed -r 's/^.{2}//'`
|
||||
if [[ $var == -D* ]]
|
||||
then
|
||||
sed -i '1s/^/#define '$arg'\n/' $dmepath.mdme
|
||||
continue
|
||||
fi
|
||||
if [[ $var == -M* ]]
|
||||
then
|
||||
sed -i '1s/^/#define MAP_OVERRIDE\n/' $dmepath.mdme
|
||||
sed -i 's!// BEGIN_INCLUDE!// BEGIN_INCLUDE\n#include "_maps\\'$arg'.dm"!' $dmepath.mdme
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
#windows
|
||||
if [[ `uname` == MINGW* ]]
|
||||
then
|
||||
dm=""
|
||||
|
||||
if hash dm.exe 2>/dev/null
|
||||
then
|
||||
dm='dm.exe'
|
||||
elif [[ -a '/c/Program Files (x86)/BYOND/bin/dm.exe' ]]
|
||||
then
|
||||
dm='/c/Program Files (x86)/BYOND/bin/dm.exe'
|
||||
elif [[ -a '/c/Program Files/BYOND/bin/dm.exe' ]]
|
||||
then
|
||||
dm='/c/Program Files/BYOND/bin/dm.exe'
|
||||
fi
|
||||
|
||||
if [[ $dm == "" ]]
|
||||
then
|
||||
echo "Couldn't find the DreamMaker executable, aborting."
|
||||
exit 3
|
||||
fi
|
||||
|
||||
"$dm" $dmepath.mdme
|
||||
retval=$?
|
||||
else
|
||||
if hash DreamMaker 2>/dev/null
|
||||
then
|
||||
DreamMaker $dmepath.mdme
|
||||
retval=$?
|
||||
else
|
||||
echo "Couldn't find the DreamMaker executable, aborting."
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
mv $dmepath.mdme.dmb $dmepath.dmb
|
||||
mv $dmepath.mdme.rsc $dmepath.rsc
|
||||
|
||||
rm $dmepath.mdme
|
||||
|
||||
exit $retval
|
||||
10
tools/jenkins-build.sh
Normal file
10
tools/jenkins-build.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash -ex
|
||||
# Blatantly stolen from /tg/'s .travis.yml script.
|
||||
curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
|
||||
unzip byond.zip
|
||||
cd byond
|
||||
sudo make install
|
||||
cd ..
|
||||
chmod +x dm.sh
|
||||
|
||||
./dm.sh baystation12.dme -Mtgstation.2.1.0.0.1
|
||||
Reference in New Issue
Block a user