michael@0: ## michael@0: ## release.sh -- Project Release Utility michael@0: ## michael@0: michael@0: # Requires: GNU shtool michael@0: # michael@0: # Usage: ./release version michael@0: # ./release tag michael@0: # ./release dist michael@0: # ./release upload michael@0: michael@0: version () { michael@0: shtool version -l c -n "Europalab schachuhr" -p "schuhr_" -e version.cpp michael@0: V=`shtool version -l c -d long version.cpp` michael@0: sed -e "s/Version .*(.*)/Version $V/g" docs/readme.txt.n michael@0: mv docs/readme.txt.n docs/readme.txt michael@0: } michael@0: michael@0: tag () { michael@0: V=`shtool version -l c -d short version.cpp | sed -e 's;\.;_;g'` michael@0: echo "+++ tagging sources as SCHUR_${V}" michael@0: hg tag SCHUR_${V} michael@0: } michael@0: michael@0: dist () { michael@0: echo "+++ cleaning" michael@0: rm -f schachuhr-*.tar.gz michael@0: echo "+++ configuring" michael@0: qmake michael@0: echo "+++ building" michael@0: make clean all -j4 michael@0: echo "+++ cleaning" michael@0: make distclean >/dev/null 2>&1 michael@0: echo "+++ fixing" michael@0: shtool fixperm -v . michael@0: echo "Please find . -exec grep myusername {}" michael@0: echo "+++ rolling" michael@0: V=`shtool version -l c -d short version.cpp` michael@0: shtool tarball -o schachuhr-${V}.tar.gz -d schachuhr-${V} \ michael@0: -e '\.hg,\.hgignore,\.[ao]$,^\.,*.tar.gz,^#.*,.*~$,*.bak' \ michael@0: -e 'release\.sh,schuhr_stub.cpp,schuhr_stub.h,schuhr_scrap' \ michael@0: -c 'gzip --best' . michael@0: ls -l schachuhr-${V}.tar.gz michael@0: echo "+++ testing" michael@0: gunzip