2 # vim: expandtab sw=4 ts=4 sts=4:
4 # Usage: make-release [branch]
10 version
=`python -c 'import Wammu; print Wammu.__version__' | tr -d '\n'`
14 if [ -f ~
/.id
/codesigning.spc
-a "x$NO_SIGN" = "x" ] ; then
15 sign_passwd
=`gk-get --user=nijel --object=codesign || true`
16 if [ -z "$sign_passwd" ] ; then
17 echo -n "Enter sign password: "
24 if [ ! -f ~
/.id
/codesigning.spc
] ; then
25 echo 'Skipping signing, no certificates!'
28 if [ "x$NO_SIGN" != "x" ] ; then
29 echo 'Skipping signing, disabled!'
32 echo "$sign_passwd" | signcode \
33 -spc ~
/.id
/codesigning.spc \
34 -v ~
/.id
/codesigning.pvk \
38 -t http
://timestamp.verisign.com
/scripts
/timstamp.dll \
39 -i http
://cihar.com
/ \
45 if [ "x$1" = "xbranch" ] ; then
49 if grep -q '^20[0-9][0-9]-??-?? - ' ChangeLog
; then
50 echo 'ChangeLog does not seem to be finalised, aborting!'
54 elif [ "x$1" = "x" ] ; then
62 tmp
=`mktemp -dt $repo-build-XXXXXX`
65 echo "Creating release $version from $checkout"
66 git clone
$srcdir $repo-$version
68 git checkout
$checkout
71 echo 'Creating source tarballs...'
74 # Build source package
75 .
/setup.py sdist
--formats=gztar
,bztar
,zip
80 # Build Windows Python installer
81 wine c
:\\python25
\\python setup.py bdist_wininst
87 wine c
:\\python25
\\python setup.py py2exe
89 # py2exe does not catch these for some reason
90 cp ~
/.wine
/drive_c
/windows
/system32
/python25.dll dist
/
91 cp ~
/.wine
/drive_c
/Python25
/Lib
/site-packages
/wx-2.8
-msw-unicode/wx
/*.dll dist
/
92 cp ~
/.wine
/drive_c
/Python25
/Lib
/site-packages
/gammu
/*.dll dist
/
95 signexe dist
/wammu.exe
"Wammu"
97 # Build Windows installer
98 wine c
:\\Program\ Files
\\Inno\ Setup\
5/\\ISCC.exe wammu.iss
99 mv Output
/$repo-$version-setup.exe ..
/
102 for bin
in $tmp/*-setup.exe
; do
103 signexe
$bin "Wammu installer"
109 echo "Release is in $tmp directory"
114 if [ $dotag -eq 1 ] ; then
116 git tag
-s -m "Tag release $version" "$version"
118 $tmp/$repo-$version/setup.py register
120 .
/admin
/upload-release
$version $tmp