From 59e91c7c58f931128e098c8b13f7a838a19de4c2 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Sat, 30 Jul 2022 15:35:46 -0400 Subject: [PATCH] CI: Fix Linux package filename version In .github/workflows/main.yml, for the linux_build job, the variable BUILD_FOR_DISTRIBUTION is set to the string "true" or "false" on CI. Later, in CI/linux/03_package_obs.sh, we perform a boolean check on this variable. However, "false" will evaluate as true, because it is a non-null string. This was causing CI Linux packages to always build as if BUILD_FOR_DISTRIBUTION was enabled, which caused the git commit hash to be omitted from package filenames. Since we know the expected values, let's just test directly if the variable equals "true" to get the expected behavior. --- CI/linux/03_package_obs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/linux/03_package_obs.sh b/CI/linux/03_package_obs.sh index 349076989..275f00d9d 100755 --- a/CI/linux/03_package_obs.sh +++ b/CI/linux/03_package_obs.sh @@ -44,7 +44,7 @@ package-obs-standalone() { GIT_HASH=$(git rev-parse --short=9 HEAD) GIT_TAG=$(git describe --tags --abbrev=0) - if [ "${BUILD_FOR_DISTRIBUTION}" ]; then + if [ "${BUILD_FOR_DISTRIBUTION}" = "true" ]; then VERSION_STRING="${GIT_TAG}" else VERSION_STRING="${GIT_TAG}-${GIT_HASH}"