projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c117263
)
[devscripts/release] Check version number
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 24 Mar 2014 09:25:49 +0000
(10:25 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 24 Mar 2014 09:25:49 +0000
(10:25 +0100)
devscripts/release.sh
patch
|
blob
|
history
diff --git
a/devscripts/release.sh
b/devscripts/release.sh
index aa3119c424556f2a14a88a2aef61c18b2b44c7bf..2974a7c3eee0e14c0f8c2f03b41ce899eeda9324 100755
(executable)
--- 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"
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')
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')