]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/infrastructure/xonotic-release-build.cron
demotc-race-record-extractor.sh: remove useless rc case (gametype name is always...
[xonotic/xonotic.git] / misc / infrastructure / xonotic-release-build.cron
index 5a5fd72c10f5afe75669cc16ae25c362de3648e8..f9f16dacb3969b832132863cda013f883c1d39ae 100755 (executable)
@@ -10,6 +10,10 @@ case "$RELEASETYPE" in
                RELEASETYPEDIR=
                RELEASETYPENAME="$RELEASETYPE"
                ;;
+       RC*)
+               RELEASETYPEDIR="$RELEASETYPE/"
+               RELEASETYPENAME="Release Candidate"
+               ;;
        *)
                RELEASETYPEDIR="$RELEASETYPE/"
                RELEASETYPENAME="$RELEASETYPE-like build"
@@ -27,7 +31,8 @@ export CACHEDIR=$HOME/.xonotic-cached-converter-crunch
 export dds_tool=crunch
 
 # Build locally.
-export HOSTS_THAT_ARE_MYSELF='xonotic-build-linux64 xonotic-build-win32 xonotic-build-win64 xonotic-build-osx'
+export HOSTS_THAT_ARE_MYSELF='xonotic-build-win32 xonotic-build-win64 xonotic-build-osx'
+export HOSTS_THAT_ARE_SCHROOT='xonotic-build-linux64'
 
 mepwd=$PWD
 me=$0
@@ -39,9 +44,9 @@ fi
 
 set -ex
 
-test "$RELEASETYPE" = "autobuild" && ssh autobuild-release-uploader@beta.xonotic.org '
+test -z "$RELEASETYPEDIR" && ssh autobuild-release-uploader@beta.xonotic.org '
        set -e;
-       s0=`date -d "now - 7 days - 12 hours" +%s`;
+       s0=`date -d "now - 30 days - 12 hours" +%s`;
        s00=`date -d "now - 60 days - 12 hours" +%s`;
        for X in * */*; do
                [ -f "$X" ] || continue;
@@ -52,6 +57,7 @@ test "$RELEASETYPE" = "autobuild" && ssh autobuild-release-uploader@beta.xonotic
                [ x"$d" != x"latest" ] || continue;
                w=`date -d $d +%w`;
                s=`date -d $d +%s`;
+               w=$(($w % 2));
                if [ "$w" -ne 0 -a "$s" -lt "$s0" -o "$s" -lt "$s00" ]; then
                        rm -f "$X";
                fi;
@@ -75,6 +81,7 @@ cd ~/xonotic-release-build
 #      b=$b ./all each sh -c 'if git rev-parse $b >/dev/null 2>&1; then git merge $b; fi'
 #done
 ./all update -N
+./all each git restore-mtime --commit-time # adding --merge would be more correct but is slow and hits git limits
 d0=`date +%Y%m%d`
 d=$d0
 i=1
@@ -83,12 +90,23 @@ while HEAD -C xonotic:g-23 http://beta.xonotic.org/autobuild/"$RELEASETYPEDIR""X
        d="$d0"_"$i"
 done
 RELEASEDATE=$d ./all release
-for X in Xonotic-$d*.zip; do
-       ln -snf "$X" "Xonotic-latest${X#Xonotic-$d}"
-done
-rsync -vaSHP Xonotic*.zip autobuild-release-uploader@beta.xonotic.org:"$RELEASETYPEDIR"
+sha512sum Xonotic-$d*.zip > Xonotic-$d.sha512
+if [ -z "$RELEASETYPEDIR" ]; then
+       sleep 1 # newer timestamps for correct file sort order in web gui
+       for X in Xonotic-$d*.zip; do
+               ln -snf "$X" "Xonotic-latest${X#Xonotic-$d}"
+       done
+       sha512sum Xonotic-latest*.zip > Xonotic-latest.sha512
+fi
+rsync -vaSHP Xonotic*.zip Xonotic*.sha512 autobuild-release-uploader@beta.xonotic.org:"$RELEASETYPEDIR"
 if [ -z "$RELEASETYPEDIR" ]; then
        ssh autobuild-release-uploader@beta.xonotic.org sh ../../update-rsync.sh "$d"
+
+       # pipeline files, see: .gitlab-ci.yml in xonotic-data.pk3dir
+       cp data/stormkeep-????????????????????????????????????????-????????????????????????????????????????.pk3 stormkeep.pk3
+       PIPELINE_FILES="gmqcc/gmqcc Xonotic/xonotic-linux64-dedicated stormkeep.pk3"
+       rsync -vSP $PIPELINE_FILES autobuild-release-uploader@beta.xonotic.org:../pipeline-bin/
+       rm -f stormkeep.pk3
 fi
 echo "Finished a new $RELEASETYPENAME at http://beta.xonotic.org/autobuild/$RELEASETYPEDIR" | $IRCSPAM
 cd