Add my release scripts to the contrib directory
[stgit/ydirson.git] / contrib / release / release.sh
blob7c2d0b9c7d14dd043f4fdaa0707d23cdaeaba28c
1 #!/bin/sh
3 # Makes a release
5 set -e
7 #UPLOAD=false
8 UPLOAD=true
10 VERSION=$(./stg --version | grep "Stacked GIT" | sed -e "s/Stacked GIT //")
11 TARBALL=dist/stgit-$VERSION.tar.gz
12 BINRPM=dist/stgit-$VERSION-1.noarch.rpm
13 SRCRPM=dist/stgit-$VERSION-1.src.rpm
14 DEBPKG=../stgit_$VERSION-0_all.deb
16 git-rev-list --pretty HEAD > ChangeLog
18 rm -f MANIFEST
20 # source distribution
21 python setup.py sdist
22 gpg --detach-sign $TARBALL
24 # build the binary distributions
25 python setup.py bdist_rpm
26 dpkg-buildpackage -rfakeroot -b
28 # Upload
29 $UPLOAD && echo Uploading...
31 $UPLOAD && lftp ftp://your-ftp-site/stgit -u username,password -e " \
32 set ftp:list-empty-ok yes; \
33 echo Uploading $TARBALL; \
34 put $TARBALL; \
35 echo Uploading $BINRPM; \
36 put $BINRPM; \
37 echo Uploading $SRCRPM; \
38 put $SRCRPM; \
39 echo Uploading $DEBPKG; \
40 put $DEBPKG; \
41 exit"
43 $UPLOAD && scp $TARBALL $TARBALL.sig username@download.gna.org:/upload/stgit/