doc: Add git-cola-1.3.7 release notes
[git-cola.git] / win32 / create-installer.sh
blobf0ddf5009840fa32080c527cac77614d1f338754
1 #!/bin/sh
3 if ! test -d win32; then
4 echo "Please run this script from the root of the cola source tree"
5 exit 1
6 fi
8 # Add Python and Gettext to our path
9 PATH=/c/Python26:"/c/Program Files/Gnu/bin":"$PWD"/win32:"$PATH"
10 export PATH
12 VERSION=$(bin/git-cola version | awk '{print $3}')
14 while test $# -gt 0;
16 case "$1" in
17 -v|--version)
18 shift
19 VERSION="$1"
20 shift
23 echo "Usage: $0 [--version <version>]"
24 exit 1
26 esac
27 done
29 BASENAME=git-cola-$VERSION
30 ETC=$BASENAME/etc
31 ROOT="$PWD"/$BASENAME
32 TARGET="$ROOT".exe
34 echo "Building installer for git-cola v$VERSION"
36 python setup.py --quiet install \
37 --root="$ROOT" \
38 --prefix='.' \
39 --install-scripts=bin
40 rm -rf "$ROOT"/lib "$ROOT"/Lib build
42 cp $BASENAME/bin/git-cola $BASENAME/bin/git-cola.pyw
43 mkdir -p $ETC 2>/dev/null
44 cp win32/git.bmp win32/gpl-2.0.rtf win32/git.ico $ETC
46 NOTES=$ETC/ReleaseNotes.txt
48 printf "git-cola: v$VERSION\nBottled-on: $(date)\n\n\n" > $NOTES
49 printf "To run cola, just type 'cola' from a Git Bash session.\n\n\n" >> $NOTES
50 if test -f meta/ReleaseNotes; then
51 cat meta/ReleaseNotes >> $NOTES
54 tag=$(git tag | tail -2 | head -1)
55 echo "--------------------------------------------------------" >> $NOTES
56 echo " Changes since $tag" >> $NOTES
57 echo "--------------------------------------------------------" >> $NOTES
58 echo >> $NOTES
59 git shortlog $tag.. >> $NOTES
61 # LF -> CRLF
62 vim -c "set ff=dos" -c "wq" $NOTES
64 OUTPUTDIR="$(pwd -W)" &&
65 sed -e "s/%APPVERSION%/$VERSION/" -e "s@%OUTPUTDIR%@$OUTPUTDIR@" \
66 < win32/install.iss > $BASENAME/install.iss &&
67 cd "$BASENAME" &&
68 echo "Lauching Inno Setup compiler ..." &&
69 /share/InnoSetup/ISCC.exe install.iss /q | grep -Ev "\s*Reading|\s*Compressing" &&
70 cd .. &&
71 rm -rf "$BASENAME"