]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
release build: also delete stale zip files
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 6c5018d8148ee86d1f1a4f2e9315102e09fc2d0b..874d4f39a15d3c88638715448c5e1333531035a9 100755 (executable)
--- a/all
+++ b/all
@@ -860,7 +860,7 @@ case "$cmd" in
        # release building goes here
        release-prepare)
                #"$SELF" each git clean -fxd
-               rm -rf Xonotic
+               rm -rf Xonotic Xonotic*.zip
                mkdir -p Xonotic
                date +%Y%m%d > Xonotic/stamp.txt
                git archive --format=tar HEAD -- Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh misc/buildfiles | {
@@ -1053,6 +1053,18 @@ case "$cmd" in
                                fi
                        done
                fi
+               if [ -f "defaultXonotic.cfg" ]; then
+                       gv=`grep "^gameversion " "defaultXonotic.cfg" | awk '{ print $2 }'`
+                       major=$(($gv / 10000))
+                       minor=$(($gv / 100 - $major * 100))
+                       patch=$(($gv - $major * 10000 - $minor * 100))
+                       sed -i "
+                               s/^set g_xonoticversion [^ ]* /set g_xonoticversion $major.$minor.$patch /;
+                               s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/;
+                               s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/;
+                       " defaultXonotic.cfg
+                       echo "r_texture_dds_load 1" >> quake.rc
+               fi
                "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
                cd Xonotic/temp
                zip -9r "../../$dst" . ########### 7za a -tzip -mx=9 "../../$dst" .