diff --git a/scripts/make-update b/scripts/make-update new file mode 100755 index 00000000..4c940e1b --- /dev/null +++ b/scripts/make-update @@ -0,0 +1,36 @@ +#!/bin/bash + +if [ $# != 2 ]; then + echo "Usage: $0 last-release-date package-to-update" + echo " e.g. $0 20131030 sepolgen" + exit 1 +fi + +TAG=$1 +PKG=$2 + +DEST=../update-$TAG +mkdir -p $DEST + +if [ \! -d $PKG ]; then + echo "$PKG does not exist." + exit 1 +fi + +cd $PKG +VERS=`cat VERSION` +ARCHIVE=$PKG-$VERS.tar.gz +git tag $PKG-$VERS +git archive --format=tar --prefix=$PKG-$VERS/ $PKG-$VERS | gzip > ../$DEST/$ARCHIVE +cd .. + +cd $DEST + +echo "Copy $ARCHIVE from $DEST to the server and update its download link and checksum on the Releases wiki page:" + +echo "" + +echo "[http://userspace.selinuxproject.org/releases/$TAG/$ARCHIVE $ARCHIVE]" +echo "" +echo "`sha256sum $ARCHIVE`" +echo "" diff --git a/scripts/release b/scripts/release index a8718977..e48d01b8 100755 --- a/scripts/release +++ b/scripts/release @@ -5,18 +5,23 @@ DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy sepolgen" git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')" -rm -rf $(DEST) -mkdir -p $(DEST) +rm -rf $DEST +mkdir -p $DEST for i in $DIRS; do cd $i - git archive --format=tar --prefix=$i-`cat VERSION`/ HEAD | gzip > ../$(DEST)/$i-`cat VERSION`.tar.gz + VERS=`cat VERSION` + ARCHIVE=$i-$VERS.tar.gz + git tag $i-$VERS > /dev/null 2>&1 + git archive --format=tar --prefix=$i-$VERS/ $i-$VERS | gzip > ../$DEST/$ARCHIVE cd .. done -pushd $(DEST) +cd $DEST -echo "Copy contents of $(DEST) to the server and add the following to the Releases wiki page:" +echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:" + +echo "" echo "== Release $(date '+%Y-%m-%d') ==" @@ -26,5 +31,3 @@ for i in *.tar.gz; do echo "`sha256sum $i`" echo "" done - -popd