diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-05-11 19:34:58 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-05-11 19:34:58 +0200 |
commit | 264fef834ab10fc672eb72bbf7da822e2a93a578 (patch) | |
tree | a7bcce1a09755e7dde3afe825baa15d849959ec0 /release.sh | |
parent | abc4db5913bebc4d16b22d8856dba16c695a1477 (diff) | |
parent | 8c016e8ace989e3e1d0dadd7e54e61849341168f (diff) | |
download | portato-264fef834ab10fc672eb72bbf7da822e2a93a578.tar.gz portato-264fef834ab10fc672eb72bbf7da822e2a93a578.tar.bz2 portato-264fef834ab10fc672eb72bbf7da822e2a93a578.zip |
Pre-release merge
Merge branch '0.14'
* 0.14:
Fix release script pathes
Add '--plugin-dir' option
Add a README message to the release
Add a release file
Improve setup.py for release script
Improve constants.py for release script
Diffstat (limited to 'release.sh')
-rwxr-xr-x | release.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..9a3936f --- /dev/null +++ b/release.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +fail () +{ + echo ERROR: $1 + exit $2 +} + +replace_by () +{ + echo ">>> ** Replace $1 by $2" + + sed -i -e "s#^\($1\s*=\s*\).*#\1$2#" portato/constants.py \ + || fail "Failure replacing $1" 1 +} + +ver=$(git describe --tags | sed -e "s/^v//") +name=portato-$ver + +echo ">>> Cloning..." +git clone . $name || fail "Cloning" 1 + +pushd $name > /dev/null + +echo ">>> Compiling Cython sources" +find -name '*.pyx' | xargs cython || fail "Cython" 1 + +echo ">>> Patching constants.py" +replace_by VERSION "'$ver'" +replace_by ROOT_DIR "'/'" +replace_by LOCALE_DIR "pjoin(ROOT_DIR, '/usr/share/locale')" +replace_by TEMPLATE_DIR "pjoin(ROOT_DIR, DATA_DIR, 'templates')" +replace_by DATA_DIR "'/usr/share/portato/'" + +echo ">>> Patching setup.py." +sed -i -e "s/^.*#!REMOVE\$//" setup.py || fail "Failure removing lines" 1 +sed -i -e "s/^\(\s*\)#!INSERT \(.*\)/\1\2/" setup.py || fail "Failure inserting lines" 1 + +echo ">>> Creating README" +cat << EOF > README +This package is intended solely for being used system-wide (normally installed via Portage). + +If you want to have a packed version (for whatever reason), please use one of the following sources: + +* Packed snapshot: http://git.necoro.eu/portato.git/snapshot/portato-v${ver}.tar.gz +* Git Tree: git clone git://necoro.eu/portato.git --> cd portato --> git checkout -b v${ver} v${ver} + +In both cases you should read: http://necoro.eu/portato/development + +EOF + +popd > /dev/null + +echo ">>> Packing" +tar -zcvf ${name}.tar.gz $name --exclude ".git*" || fail "Packing" 1 + +echo ">>> Removing temp dir" +rm -rf $name || fail "Removing" 1 |