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