Fix release script once more
[youtube-dl] / devscripts / release.sh
index 20a96c6a9a4d5d72cfedc42372063215e2785ac6..d32ae47dd22d82be6567692e12ec0b31715f5e27 100755 (executable)
 
 set -e
 
-skip_test=false
-if [ "$2" = '--skip-test' ]; then
-    skip_test=true
+skip_tests=false
+if [ "$1" = '--skip-test' ]; then
+    skip_tests=true
+    shift
 fi
+
 if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi
 version="$1"
 if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi
@@ -26,7 +28,7 @@ if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit
 
 /bin/echo -e "\n### First of all, testing..."
 make cleanall
-if $skip_tests; then
+if $skip_tests ; then
     echo 'SKIPPING TESTS'
 else
     nosetests --verbose --with-coverage --cover-package=youtube_dl --cover-html test --stop || exit 1