]> Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/release.sh
963a6c22bcde80fb4c666f8e9e68230cfbf3be93
[youtubedl] / devscripts / release.sh
1 #!/bin/sh
2
3 if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi
4 version="$1"
5 if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi
6 if [ ! -z "`git status --porcelain`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi
7 sed -i "s/__version__ = '.*'/__version__ = '$version'/" youtube_dl/__init__.py
8 make all
9 git add -A
10 git commit -m "release $version"
11 git tag -m "Release $version" "$version"