소스 검색

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