diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-07 14:40:08 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-07 14:40:09 +0200 |
commit | c5527f07bf9dbdecfae13ae5e2c5904a5cf3bf40 (patch) | |
tree | 553fecfa196c7fa1b8a24677a1718bcdde41d9ce | |
parent | 922d2760351f71bffce37baa2c1cf05d764ca82d (diff) |
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
-rwxr-xr-x | osmo-release.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/osmo-release.sh b/osmo-release.sh index 4446da78..d59083c0 100755 --- a/osmo-release.sh +++ b/osmo-release.sh @@ -9,6 +9,8 @@ fi 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 @@ if [ "z$LIBVERS" != "z" ]; then 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 |