osmith has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39896?usp=email )
Change subject: osmo-release: improve check for REL argument ......................................................................
osmo-release: improve check for REL argument
Verify that REL is actually "patch", "minor" or "major". If it is something else (e.g. because of a typo), the script would contiune otherwise and create an invalid release commit without bumping the version.
Change-Id: Ibac10dbc983b6d65cce6de10371fb731505a7ce8 --- M osmo-release.sh 1 file changed, 10 insertions(+), 2 deletions(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified
diff --git a/osmo-release.sh b/osmo-release.sh index 61adf57..14790da 100755 --- a/osmo-release.sh +++ b/osmo-release.sh @@ -2,7 +2,7 @@ VERSION=$1 REL=$2
-if [ "z$REL" = "z" ]; then +help() { echo "usage: make REL=patch|minor|major release" echo echo "optional environment variables:" @@ -14,7 +14,15 @@ echo "See also:" echo "https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release" exit 1 -fi +} + +case "$REL" in + patch|minor|major) + ;; + *) + help + ;; +esac
ALLOW_NO_LIBVERSION_CHANGE="${ALLOW_NO_LIBVERSION_CHANGE:-0}" ALLOW_NO_LIBVERSION_DEB_MATCH="${ALLOW_NO_LIBVERSION_DEB_MATCH:-0}"