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.
This commit is contained in:
Ryan Foster 2022-07-30 15:35:46 -04:00 committed by Matt Gajownik
parent a9a65a88d8
commit 59e91c7c58

View File

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