From 1943bfd244ed98103c4fd8e025df4c3e33258b44 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 2 Feb 2009 12:39:42 +0100 Subject: [PATCH] update release script Signed-off-by: Nico Schottelius --- release.sh | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/release.sh b/release.sh index e6ae08a..976a5c4 100755 --- a/release.sh +++ b/release.sh @@ -20,38 +20,39 @@ # Standard release script for dummies like me # -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" +if [ $# -ne 2 ]; then + echo "$0: version description" exit 23 fi echo "Did you change version and date information in the script?" read bla -NAME=$1 +VERSION="$1"; shift +DESCRIPTION="$1"; shift +NAME=ccollect-${VERSION} TARNAME=${NAME}.tar.bz2 - +TARLOCAL=../${TARNAME} DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ +DDIR=www/unix.schottelius.org/www/ccollect/ DESTINATION="$DHOST:$DDIR" -# create documentation for the end user -( - cd "$NAME" - make dist - make publish-doc -) +set -e +set -x +git tag -m "$DESCRIPTION" "$VERSION" +git push --mirror +git archive --prefix="${NAME}/" "$VERSION" | bzip2 > "$TARLOCAL" +scp "${TARLOCAL}" "$DESTINATION" -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" +# create & publish documentation for the end user +make publish-doc -scp "${TARNAME}" "$DESTINATION" -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" +ssh "$DHOST" "( cd "$DDIR" &&; tar xfj \"$TARNAME\" )" echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" +ssh "$DHOST" "( cd "$DDIR" && find -type d -exec chmod 0755 {} \; )" +ssh "$DHOST" "( cd "$DDIR" &&; find -type f -exec chmod 0644 {} \; )" -cat "${NAME}/doc/release-checklist" +cat "doc/release-checklist" +exit 0