From 3dd412a16de7140fafbf738ba99f6a02e3780c51 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 8 Jun 2007 23:46:11 +0100 Subject: [PATCH] Add my release scripts to the contrib directory Signed-off-by: Catalin Marinas --- .gitignore | 3 +++ Makefile | 6 +++--- README | 3 +++ contrib/release/README | 2 ++ contrib/release/post-update | 24 ++++++++++++++++++++++++ contrib/release/release.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ contrib/release/snapshot.sh | 24 ++++++++++++++++++++++++ 7 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 contrib/release/README create mode 100755 contrib/release/post-update create mode 100755 contrib/release/release.sh create mode 100755 contrib/release/snapshot.sh diff --git a/.gitignore b/.gitignore index d45ff67..91dbad2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ dist MANIFEST patches-* *-stamp +release.sh +setup.cfg.rpm +snapshot.sh diff --git a/Makefile b/Makefile index d6c0b56..8671209 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -PREFIX = $(HOME) -DESTDIR = / -PYTHON = python +PREFIX ?= $(HOME) +DESTDIR ?= / +PYTHON ?= python all: $(PYTHON) setup.py build diff --git a/README b/README index 184ded8..0e648f5 100644 --- a/README +++ b/README @@ -12,3 +12,6 @@ StGIT commands. For the latest version see http://www.procode.org/stgit/ For a tutorial see http://wiki.procode.org/cgi-bin/wiki.cgi/StGIT_Tutorial + +Bugs or feature requests should be sent to the git@vger.kernel.org +mailing list or the StGIT project page - http://gna.org/projects/stgit/ diff --git a/contrib/release/README b/contrib/release/README new file mode 100644 index 0000000..d40007d --- /dev/null +++ b/contrib/release/README @@ -0,0 +1,2 @@ +This directory contains some of the scripts used for updating the +public StGIT repository and releasing snapshots and main versions. diff --git a/contrib/release/post-update b/contrib/release/post-update new file mode 100755 index 0000000..d7ae4ca --- /dev/null +++ b/contrib/release/post-update @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, make this file executable by "chmod +x post-update". + +git repack -d +git-update-server-info + +# FTP upload +lftp ftp://your-ftp-site/stgit.git -u username,password -e " \ +set ftp:list-empty-ok yes; \ +echo Uploading objects; \ +mirror -RLecv objects objects; \ +echo Uploading refs; \ +mirror -RLecv refs refs; \ +echo Uploading info; \ +mirror -RLecv info info; \ +echo Uploading description; \ +put description -o description; \ +echo Uploading HEAD; \ +put HEAD -o HEAD; \ +exit" diff --git a/contrib/release/release.sh b/contrib/release/release.sh new file mode 100755 index 0000000..7c2d0b9 --- /dev/null +++ b/contrib/release/release.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Makes a release + +set -e + +#UPLOAD=false +UPLOAD=true + +VERSION=$(./stg --version | grep "Stacked GIT" | sed -e "s/Stacked GIT //") +TARBALL=dist/stgit-$VERSION.tar.gz +BINRPM=dist/stgit-$VERSION-1.noarch.rpm +SRCRPM=dist/stgit-$VERSION-1.src.rpm +DEBPKG=../stgit_$VERSION-0_all.deb + +git-rev-list --pretty HEAD > ChangeLog + +rm -f MANIFEST + +# source distribution +python setup.py sdist +gpg --detach-sign $TARBALL + +# build the binary distributions +python setup.py bdist_rpm +dpkg-buildpackage -rfakeroot -b + +# Upload +$UPLOAD && echo Uploading... + +$UPLOAD && lftp ftp://your-ftp-site/stgit -u username,password -e " \ +set ftp:list-empty-ok yes; \ +echo Uploading $TARBALL; \ +put $TARBALL; \ +echo Uploading $BINRPM; \ +put $BINRPM; \ +echo Uploading $SRCRPM; \ +put $SRCRPM; \ +echo Uploading $DEBPKG; \ +put $DEBPKG; \ +exit" + +$UPLOAD && scp $TARBALL $TARBALL.sig username@download.gna.org:/upload/stgit/ diff --git a/contrib/release/snapshot.sh b/contrib/release/snapshot.sh new file mode 100755 index 0000000..a81df52 --- /dev/null +++ b/contrib/release/snapshot.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Builds a daily snapshot + +VERSION=`date "+%Y%m%d"` +SNAPSHOT=dist/stgit-$VERSION.tar.gz + +git-rev-list --pretty HEAD > ChangeLog + +mv stgit/version.py stgit/version.py- +echo "version = '$VERSION'" > stgit/version.py + +rm -f MANIFEST +python setup.py sdist + +rm stgit/version.py +mv stgit/version.py- stgit/version.py + +# Upload +lftp ftp://your-ftp-site/stgit/snapshots -u username,password -e " \ +set ftp:list-empty-ok yes; \ +echo Uploading $SNAPSHOT; \ +put $SNAPSHOT; \ +exit" -- 2.11.0