osmith has uploaded this change for review. ( 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, 17 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/39896/1 diff --git a/osmo-release.sh b/osmo-release.sh index 61adf57..e5c8e8f 100755 --- a/osmo-release.sh +++ b/osmo-release.sh @@ -2,19 +2,23 @@ VERSION=$1 REL=$2 -if [ "z$REL" = "z" ]; then - echo "usage: make REL=patch|minor|major release" - echo - echo "optional environment variables:" - echo " DRY_RUN=1 run checks but make no modifications" - echo " ALLOW_NO_LIBVERSION_CHANGE=1 skip LIBVERSION in Makefile.am fchecks" - echo " ALLOW_NO_LIBVERSION_DEB_MATCH=1 skip LIBVERSION in debian packaging checks" - echo " ALLOW_NO_LIBVERSION_RPM_MATCH=1 skip LIBVERSION in rpm packaging checks" - echo - echo "See also:" - echo "https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release" - exit 1 -fi +case "$REL" in + patch|minor|major) + ;; + *) + echo "usage: make REL=patch|minor|major release" + echo + echo "optional environment variables:" + echo " DRY_RUN=1 run checks but make no modifications" + echo " ALLOW_NO_LIBVERSION_CHANGE=1 skip LIBVERSION in Makefile.am fchecks" + echo " ALLOW_NO_LIBVERSION_DEB_MATCH=1 skip LIBVERSION in debian packaging checks" + echo " ALLOW_NO_LIBVERSION_RPM_MATCH=1 skip LIBVERSION in rpm packaging checks" + echo + echo "See also:" + echo "https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release" + exit 1 + ;; +esac ALLOW_NO_LIBVERSION_CHANGE="${ALLOW_NO_LIBVERSION_CHANGE:-0}" ALLOW_NO_LIBVERSION_DEB_MATCH="${ALLOW_NO_LIBVERSION_DEB_MATCH:-0}" -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39896?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibac10dbc983b6d65cce6de10371fb731505a7ce8 Gerrit-Change-Number: 39896 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de>