osmo-release.sh: Properly rearrange var init and sanity checks

Change-Id: If62024fafcd30bc3399115248116e15e141b1cbb
diff --git a/osmo-release.sh b/osmo-release.sh
index 173652d..eea17cf 100755
--- a/osmo-release.sh
+++ b/osmo-release.sh
@@ -201,21 +201,19 @@
 
 
 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..."