aboutsummaryrefslogtreecommitdiffstats
path: root/osmo-release.sh
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-02-24 16:44:48 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-02-24 16:44:48 +0100
commit43abde1b3afd791528cf33eee9fabe8410245962 (patch)
treed2e4d3289ce657c2a59de1e394f2f8addfd52dbf /osmo-release.sh
parente6230eff90e10fe7612fa0c9a792b43b2e47cedd (diff)
osmo-release.sh: Properly rearrange var init and sanity checks
Diffstat (limited to 'osmo-release.sh')
-rwxr-xr-xosmo-release.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/osmo-release.sh b/osmo-release.sh
index 173652db..eea17cf9 100755
--- a/osmo-release.sh
+++ b/osmo-release.sh
@@ -201,21 +201,19 @@ libversion_rpmspecin_match() {
BUMPVER=`command -v bumpversion`
-GIT_TOPDIR="$(git rev-parse --show-toplevel)"
-NEW_VER=`bumpversion --list --current-version $VERSION $REL --allow-dirty | awk -F '=' '{ print $2 }'`
-LIBVERS=`git grep -n LIBVERSION | grep '=' | grep am | grep -v LDFLAGS`
-MAKEMOD=`git diff --cached -GLIBVERSION --stat | grep Makefile.am`
-ISODATE=`date -I`
-
if [ "z$BUMPVER" = "z" ]; then
echo Unable to find 'bumpversion' command.
exit 1
fi
-
+NEW_VER=`$BUMPVER --list --current-version $VERSION $REL --allow-dirty | awk -F '=' '{ print $2 }'`
if [ "z$NEW_VER" = "z" ]; then
echo "Please fix versioning to match http://semver.org/ spec (current is $VERSION) before proceeding."
exit 1
fi
+GIT_TOPDIR="$(git rev-parse --show-toplevel)"
+LIBVERS=`git grep -n LIBVERSION | grep '=' | grep am | grep -v LDFLAGS`
+MAKEMOD=`git diff --cached -GLIBVERSION --stat | grep Makefile.am`
+ISODATE=`date -I`
echo "Releasing $VERSION -> $NEW_VER..."