]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Clean up misc/tools/tag-release.sh
authorDr. Jaska <drjaska83@gmail.com>
Mon, 22 Jul 2024 20:42:02 +0000 (20:42 +0000)
committerDr. Jaska <drjaska83@gmail.com>
Mon, 22 Jul 2024 20:42:02 +0000 (20:42 +0000)
misc/tools/tag-release.sh

index 15f56d9ed20e77816d8183f64f60ec72055f1a81..b149dffd7abb289e8bcd04bd6d1bf233dd25716a 100755 (executable)
@@ -1,31 +1,50 @@
 #!/bin/sh
 
-VER=$1
+# misc/tools/tag-release.sh
 
-case "$VER" in
-       '')
-               echo "Need version number as argument"
-               exit 1
+# bail when we aren't supposed to be making a release :)
+[ "$REALLY_DO_IT" != "yes" ] && exit 2
+
+case "$#" in
+       1)
+               VER=$1
                ;;
        *)
+               echo "Need version number as argument"
+               exit 1
                ;;
 esac
 
+set -eux
+
+
+
+# find xonotic/xonotic.git root repo
+ROOTREPO="$(realpath "$(dirname misc/tools/tag-release.sh)/../../")"
+cd "$ROOTREPO"
+git pull
+./all checkout
+./all update
+
+
+
 for r in \
-       /home/rpolzer/Games/Xonotic/. \
-       /home/rpolzer/Games/Xonotic/data/xonotic-data.pk3dir \
-       /home/rpolzer/Games/Xonotic/data/xonotic-music.pk3dir \
-       /home/rpolzer/Games/Xonotic/data/xonotic-nexcompat.pk3dir \
-       /home/rpolzer/Games/Xonotic/darkplaces \
-       /home/rpolzer/Games/Xonotic/d0_blind_id \
-       /home/rpolzer/Games/Xonotic/data/xonotic-maps.pk3dir \
-       /home/rpolzer/Games/Xonotic/mediasource \
-       /home/rpolzer/Games/Xonotic/gmqcc
+       "$ROOTREPO" \
+       "$ROOTREPO/data/xonotic-data.pk3dir" \
+       "$ROOTREPO/data/xonotic-music.pk3dir" \
+       "$ROOTREPO/data/xonotic-nexcompat.pk3dir" \
+       "$ROOTREPO/data/xonotic-xoncompat.pk3dir" \
+       "$ROOTREPO/darkplaces" \
+       "$ROOTREPO/d0_blind_id" \
+       "$ROOTREPO/data/xonotic-maps.pk3dir" \
+       "$ROOTREPO/mediasource" \
+       "$ROOTREPO/gmqcc"
+# excluded repos because not included with releases:
+       #"$ROOTREPO/netradiant"
+       #"$ROOTREPO/div0-gittools"
 do
        cd "$r"
-       git tag -u D276946B -m"version $VER" xonotic-v"$VER"
-done
 
-# excluded repos because not included with releases:
-#      /home/rpolzer/Games/Xonotic/netradiant \
-#      /home/rpolzer/Games/Xonotic/div0-gittools \
+       git tag --sign --message="version $VER" "xonotic-v$VER"
+       git push origin "xonotic-v$VER"
+done