diff --git a/create-packages.sh b/create-packages.sh
index 687890686dc0ec60687ff45704af99d6f17ecba4..3c7fcaa985bbf62d41da35a84808cc9aa5e9aec3 100755
--- a/create-packages.sh
+++ b/create-packages.sh
@@ -45,7 +45,6 @@ usage() {
 }
 
 parameters=0
-VERSION=$(awk -F\" '/__version__/{print $2}' wile_coyote/__init__.py)
 OPTS=$(getopt -o "h,d,r,w,a" --longoptions "help,deb,rpm,whl,all,push-deb" -- "$@")
 if [ $? != 0 ]; then
     usage
@@ -98,6 +97,8 @@ elif [[ -n $ALL ]]; then
 fi
 
 git pull
+VERSION=$(awk -F\" '/__version__/{print $2}' wile_coyote/__init__.py)
+
 set -e # from this point we exit on failure
 
 if [[ -n $DEB ]]; then