From: bones_was_here <bones_was_here@xa.org.au>
Date: Thu, 24 Mar 2022 12:02:34 +0000 (+1000)
Subject: pipeline: don't complain about lack of zip program and git tags
X-Git-Tag: xonotic-v0.8.5~135^2
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c830d84b94f36034b65ec7e46f279fbea80501d;p=xonotic%2Fxonotic-data.pk3dir.git

pipeline: don't complain about lack of zip program and git tags

we don't want to fetch the tags or install a zip program as it would be
slow and not useful
---

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cc7b5bd062..b5a763f2cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,6 +16,11 @@ before_script:
   - make -C gmqcc || exit 1
   - export QCC="$PWD/gmqcc/gmqcc"
 
+  # Makefile: don't complain about lack of tags (fetching them is slow)
+  - export QCCFLAGS_WATERMARK=gitlab_pipeline
+  # Makefile: don't compress anything or complain about lack of zip program
+  - export ZIP=/bin/true
+
 test_compilation_units:
   rules:
     - changes:
diff --git a/qcsrc/tools/compilationunits.sh b/qcsrc/tools/compilationunits.sh
index 375b534ae5..d13cb6e091 100755
--- a/qcsrc/tools/compilationunits.sh
+++ b/qcsrc/tools/compilationunits.sh
@@ -1,4 +1,5 @@
 #!/usr/bin/env bash
+[ -z "$QCCFLAGS_WATERMARK" ] && export QCCFLAGS_WATERMARK=$(git describe --tags --dirty='~')
 set -eu
 cd ${0%/*}
 
@@ -29,7 +30,7 @@ CPP="cc -xc -E"
 declare -a QCCDEFS=(
     -DNDEBUG=1
     -DXONOTIC=1
-    -DWATERMARK="\"$(git describe --tags --dirty='~')\""
+    -DWATERMARK="\"$QCCFLAGS_WATERMARK\""
     -DENABLE_EFFECTINFO=0
     -DENABLE_DEBUGDRAW=0
     -DENABLE_DEBUGTRACE=0