osmith submitted this change.

View Change

Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified
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(-)

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

To view, visit change 39896. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibac10dbc983b6d65cce6de10371fb731505a7ce8
Gerrit-Change-Number: 39896
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>