Browse Source

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.
Ryan Foster 3 years ago
parent
commit
59e91c7c58
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CI/linux/03_package_obs.sh

+ 1 - 1
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}"