Skip to content

Commit 99d8000

Browse files
committed
wip
1 parent 430f1cb commit 99d8000

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

scripts/auto-rebase/rebase_job_entrypoint.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,19 @@ set -o errexit
55
set -o pipefail
66
set -x
77

8-
check_semver_suffix() {
8+
check_semver_no_suffix() {
99
local version=$1
1010

1111
# Check if the version is not empty
1212
if [[ -z "$version" ]]; then
13-
echo "false"
14-
return 1
13+
return 0
1514
fi
1615

1716
# Check if the version string contains a numeric suffix of the form -xx
1817
if [[ $version =~ -[0-9]+$ ]]; then
19-
echo "true"
20-
return 0
21-
else
22-
echo "false"
2318
return 1
19+
else
20+
return 0
2421
fi
2522
}
2623

@@ -121,8 +118,7 @@ pullspec_release_lvms="registry.redhat.io/lvms4/lvms-operator-bundle:${release_l
121118
# the latest lvms release candidate replicated from CPaaS into quay
122119
pullspec_release_lvms_fallback="quay.io/lvms_dev/lvms4-lvms-operator-bundle:${release_lvms}"
123120

124-
lvms_is_candidate_build=$(check_semver_suffix "${release_lvms}")
125-
if [ "$lvms_is_candidate_build" == "false" ]; then
121+
if check_semver_no_suffix "${release_lvms}"; then
126122
./scripts/auto-rebase/rebase-lvms.sh to "${pullspec_release_lvms}"
127123
else
128124
./scripts/auto-rebase/rebase-lvms.sh to "${pullspec_release_lvms_fallback}"

0 commit comments

Comments
 (0)