| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # This file is executed by contigratord when a build is triggered. |
| 3 | # You can execute it manually too by executing /home/contigrator/contigrator/tool/trigBuild.sh |
| 4 | |
| 5 | #These variables are available: |
| 6 | # $WD = The workspace $BN = Zero padded build Number (%07i) and $BN_NUM for unpadded. |
| 7 | # $OUT = This empty directory is created for you to store the output of the build. |
| 8 | |
| 9 | OUT=/tmp/sdlballout/scip-shell filesystem . . `/tmp/sdlballout/`. |
| 10 | mkdirscip-shell system . . mkdir. /tmp/sdlballoutscip-shell filesystem . . `/tmp/sdlballout`. |
| 11 | |
| 12 | makescip-shell system . . make. -f Makefile.win clean |
| 13 | makescip-shell system . . make. -f Makefile clean |
| 14 | |
| 15 | |
| 16 | OUTDIR="SDL-Ball_1.04" |
| 17 | |
| 18 | WINPKG="$OUTDIR"_windows.zip |
| 19 | LINPKG="$OUTDIR"_linux.tar.bz2 |
| 20 | SRCPKG="$OUTDIR"_src.tar.xz |
| 21 | |
| 22 | mkdirscip-shell system . . mkdir. -p $OUTDIR |
| 23 | |
| 24 | # Create the changelog |
| 25 | gitscip-shell system . . git. log > changelog.txt |
| 26 | cpscip-shell system . . cp. changelog.txt $OUTDIR |
| 27 | |
| 28 | # Compile for linux |
| 29 | makescip-shell system . . make. -f Makefile |
| 30 | mvscip-shell system . . mv. sdl-ball $OUTDIR/sdl-ball_linux_x64 |
| 31 | makescip-shell system . . make. -f Makefile clean |
| 32 | |
| 33 | # Compile for windows |
| 34 | makescip-shell system . . make. -f Makefile.win |
| 35 | |
| 36 | # Package datafiles |
| 37 | cpscip-shell system . . cp. -a leveleditor $OUTDIR |
| 38 | cpscip-shell system . . cp. -a themes $OUTDIR |
| 39 | cpscip-shell system . . cp. *.txt $OUTDIR |
| 40 | |
| 41 | # Package linux version |
| 42 | |
| 43 | tarscip-shell system . . tar. -c $OUTDIR | pbzip2scip-shell system . . pbzip2. > $LINPKG |
| 44 | rmscip-shell system . . rm. $OUTDIR/sdl-ball_linux_x64 |
| 45 | |
| 46 | # Package windows version |
| 47 | mvscip-shell system . . mv. sdl-ball.exe $OUTDIR/SDL-Ball.exe |
| 48 | cpscip-shell system . . cp. win32/readme_SDL.txt $OUTDIR |
| 49 | unix2dos $OUTDIR/*.txt |
| 50 | cpscip-shell system . . cp. win32/*.dll $OUTDIR |
| 51 | zip -r $WINPKG $OUTDIR |
| 52 | makescip-shell system . . make. -f Makefile.win clean |
| 53 | |
| 54 | # Build the source code |
| 55 | gitscip-shell system . . git. archive --prefix="SDL-Ball_src/" HEAD > "$OUTDIR"_src.tar |
| 56 | tarscip-shell system . . tar. --file "$OUTDIR"_src.tar --append --transform 's%^%SDL-Ball_src/%' changelog.txt |
| 57 | catscip-shell system . . cat. "$OUTDIR"_src.tar | pxz > "$OUT/$SRCPKG" |
| 58 | |
| 59 | rmscip-shell system . . rm. -R $OUTDIR *.tar |
| 60 | rmscip-shell system . . rm. changelog.txt |
| 61 | |
| 62 | mvscip-shell system . . mv. $WINPKG $OUT |
| 63 | mvscip-shell system . . mv. $LINPKG $OUT |
| 64 | |
| 65 | mvscip-shell system . . mv. $OUT . |