ci: make sure we only read the first line from install/VERSION
authorAndres Gomez <agomez@igalia.com>
Wed, 5 May 2021 07:10:44 +0000 (10:10 +0300)
committerMarge Bot <eric+marge@anholt.net>
Sat, 22 May 2021 06:26:28 +0000 (06:26 +0000)
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10856>

.gitlab-ci/piglit/run.sh
.gitlab-ci/piglit/run_cl.sh
.gitlab-ci/prepare-artifacts.sh

index 5c21ef5..9fa607d 100755 (executable)
@@ -15,7 +15,7 @@ export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/"
 
 # Sanity check to ensure that our environment is sufficient to make our tests
 # run against the Mesa built by CI, rather than any installed distro version.
-MESA_VERSION=$(cat "$INSTALL/VERSION" | sed 's/\./\\./g')
+MESA_VERSION=$(head -1 "$INSTALL/VERSION" | sed 's/\./\\./g')
 
 print_red() {
     RED='\033[0;31m'
index a1f01bb..b32e1e6 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 set -o xtrace
 
-VERSION=`cat install/VERSION`
+VERSION=`head -1 install/VERSION`
 
 if [ -d results ]; then
     cd results && rm -rf ..?* .[!.]* *
index 1067f24..26a58bf 100755 (executable)
@@ -24,7 +24,7 @@ fi
 
 # Test runs don't pull down the git tree, so put the dEQP helper
 # script and associated bits there.
-echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION
+echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > install/VERSION
 cp -Rp .gitlab-ci/bare-metal install/
 cp -Rp .gitlab-ci/common install/
 cp -Rp .gitlab-ci/piglit install/