浏览代码

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 年之前
父节点
当前提交
59e91c7c58
共有 1 个文件被更改,包括 1 次插入1 次删除
  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}"