aboutsummaryrefslogtreecommitdiff
path: root/devscripts
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-24 10:25:49 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-24 10:25:49 +0100
commit4c0941853a71c1055bae5411812a0b0eae23ba17 (patch)
treee342320db42b87d90c6bceade6bd52f9b8b6b182 /devscripts
parentc11726364e26d9993ecb43574238855646e0e238 (diff)
[devscripts/release] Check version number
Diffstat (limited to 'devscripts')
-rwxr-xr-xdevscripts/release.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/devscripts/release.sh b/devscripts/release.sh
index aa3119c42..2974a7c3e 100755
--- a/devscripts/release.sh
+++ b/devscripts/release.sh
@@ -22,6 +22,12 @@ fi
if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi
version="$1"
+major_version=$(echo "$version" | sed -n 's#^\([0-9]*\.[0-9]*\.[0-9]*\).*#\1#p')
+if test "$major_version" '!=' "$(date '+%Y.%m.%d')"; then
+ echo "$version does not start with today's date!"
+ exit 1
+fi
+
if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi
if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi
useless_files=$(find youtube_dl -type f -not -name '*.py')