chiark / gitweb /
Add my release scripts to the contrib directory
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 8 Jun 2007 22:46:11 +0000 (23:46 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 8 Jun 2007 22:46:11 +0000 (23:46 +0100)
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
.gitignore
Makefile
README
contrib/release/README [new file with mode: 0644]
contrib/release/post-update [new file with mode: 0755]
contrib/release/release.sh [new file with mode: 0755]
contrib/release/snapshot.sh [new file with mode: 0755]

index d45ff67b51f451621e08cc96e70a3c19f3b87082..91dbad2466fee68a2193dd45b0e604e7b4945931 100644 (file)
@@ -3,3 +3,6 @@ dist
 MANIFEST
 patches-*
 *-stamp
+release.sh
+setup.cfg.rpm
+snapshot.sh
index d6c0b56a7ad4428a0b59cfc5b265e10884c22d71..8671209466d78e2b528a7f6565c1a30b903dc6ce 100644 (file)
--- 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 184ded8e08cb92a14b79c79f9919469ba352ab70..0e648f5ef80321ebd4df1a7851a40a8071c59ac7 100644 (file)
--- 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 (file)
index 0000000..d40007d
--- /dev/null
@@ -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 (executable)
index 0000000..d7ae4ca
--- /dev/null
@@ -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 (executable)
index 0000000..7c2d0b9
--- /dev/null
@@ -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 (executable)
index 0000000..a81df52
--- /dev/null
@@ -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"