From cd319b428f2a0b6f779a543dd49340d1f3edcf56 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 5 Sep 2021 13:02:31 +0200 Subject: [PATCH] ci/build.sh: fix missing VERSION_ID on MSYS2/MinGW This change will allow treating unset variables as errors in an upcoming commit. This problem also caused the build artifacts to be moved to the wrong directory, but that did not have any consequences since the build artifacts are currently not archived in the CI jobs. An upcoming commit in this series will however change that. --- ci/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index 766785ac7..326ca257d 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -7,6 +7,10 @@ set -o pipefail if [ -f /etc/os-release ]; then cat /etc/os-release . /etc/os-release + if [ "${OSTYPE}" = "msys" ]; then + # MSYS2/MinGW doesn't have VERSION_ID in /etc/os-release + VERSION_ID=$( uname -r ) + fi else ID=$( uname -s ) VERSION_ID=$( uname -r ) -- 2.40.0