mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-10 13:19:08 +00:00
Merge pull request #286 from marcov/fix-version-compare
obs-packaging: support comparisons of pre-releases versions
This commit is contained in:
@@ -140,7 +140,9 @@ main() {
|
|||||||
source "./${versions_txt}" || exit 1
|
source "./${versions_txt}" || exit 1
|
||||||
kata_version=${kata_version/\~/-}
|
kata_version=${kata_version/\~/-}
|
||||||
[ -n "${kata_version}" ] || die "${version_file} does not contain a valid kata_version variable"
|
[ -n "${kata_version}" ] || die "${version_file} does not contain a valid kata_version variable"
|
||||||
[ "$(get_kata_version $branch)" = "${kata_version}" ] && compare_result="matches" || compare_result="is different from"
|
# Replacing ~ with -, as - is not a valid char for rpmbuild
|
||||||
|
# see https://github.com/semver/semver/issues/145
|
||||||
|
[ "$(get_kata_version $branch)" = "${kata_version/\~/-}" ] && compare_result="matches" || compare_result="is different from"
|
||||||
echo "${kata_version} in ${versions_txt} ${compare_result} the version at branch ${branch}"
|
echo "${kata_version} in ${versions_txt} ${compare_result} the version at branch ${branch}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user