Change in ...libosmocore[master]: osmo-release.sh: Add DRY_RUN mode

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Aug 7 15:45:46 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/libosmocore/+/15096 )

Change subject: osmo-release.sh: Add DRY_RUN mode
......................................................................

osmo-release.sh: Add DRY_RUN mode

This option allows testing if everything is in place before attempting
release related actions such as commiting, applying tag, etc.
It's also useful during development of the osmo-release.sh release
itself, sine it makes test iterations faster (no need to undo actions
done).

Change-Id: Ie5c320b7c92f92fcc37287bb9801368265a986b3
---
M osmo-release.sh
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/osmo-release.sh b/osmo-release.sh
index 4446da7..d59083c 100755
--- a/osmo-release.sh
+++ b/osmo-release.sh
@@ -9,6 +9,8 @@
 
 ALLOW_NO_LIBVERSION_CHANGE="${ALLOW_NO_LIBVERSION_CHANGE:-0}"
 ALLOW_NO_LIBVERSION_DEB_MATCH="${ALLOW_NO_LIBVERSION_DEB_MATCH:-0}"
+# Test stuff but don't modify stuff:
+DRY_RUN="${DRY_RUN:-0}"
 
 libversion_to_deb_major() {
 	libversion="$1"
@@ -73,12 +75,19 @@
 			exit 1
 		fi
 	fi
+	if [ "z$DRY_RUN" != "z0" ]; then
+		exit 0
+	fi
 	if [ -f "TODO-RELEASE" ]; then
 		grep '#' TODO-RELEASE > TODO-RELEASE.clean
 		mv TODO-RELEASE.clean TODO-RELEASE
 		git add TODO-RELEASE
 	fi
 fi
+
+if [ "z$DRY_RUN" != "z0" ]; then
+	exit 0
+fi
 gbp dch --debian-tag='%(version)s' --auto --meta --git-author --multimaint-merge --ignore-branch --new-version="$NEW_VER"
 dch -r -m --distribution "unstable" ""
 git add debian/changelog

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15096
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie5c320b7c92f92fcc37287bb9801368265a986b3
Gerrit-Change-Number: 15096
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190807/a63099d6/attachment.htm>


More information about the gerrit-log mailing list