# HG changeset patch # User Paul Boddie # Date 1461361111 -7200 # Node ID 73c6d3841f7fe43b69ff46a019657ff19c3b908e # Parent 02bd52e416388e1a9e9562d0842632e95709e4cd Improved and documented the release archive management tools. diff -r 02bd52e41638 -r 73c6d3841f7f docs/tools/make_releases.sh --- a/docs/tools/make_releases.sh Fri Apr 22 23:26:51 2016 +0200 +++ b/docs/tools/make_releases.sh Fri Apr 22 23:38:31 2016 +0200 @@ -1,17 +1,24 @@ #!/bin/sh -DIRNAME=`dirname $0` -PROGNAME=`basename $0` -OUTDIR=$1 -FORCE=$2 +DIRNAME=`dirname "$0"` +PROGNAME=`basename "$0"` -if [ ! "$OUTDIR" ]; then +if [ ! "$1" ] || [ "$1" = '--help' ] ; then cat 1>&2 < [ -f ] + +Make release archives from tags starting with "rel-" in the repository, +storing the archives in the output directory. If an archive already exists for +a release, it is not regenerated unless the -f (force) option is given. + +All newly-created archive filenames are emitted on standard output. EOF exit 1 fi +OUTDIR=$1 +FORCE=$2 + if [ "$FORCE" != '-f' ]; then FORCE= fi @@ -25,6 +32,6 @@ OUTFILE="$OUTDIR/imip-agent-$NUM.tar.bz2" if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then hg archive -t tbz2 -r "$TAG" "$OUTFILE" + echo "$OUTFILE" fi - echo "$OUTFILE" done diff -r 02bd52e41638 -r 73c6d3841f7f docs/tools/sign_releases.sh --- a/docs/tools/sign_releases.sh Fri Apr 22 23:26:51 2016 +0200 +++ b/docs/tools/sign_releases.sh Fri Apr 22 23:38:31 2016 +0200 @@ -1,17 +1,24 @@ #!/bin/sh -DIRNAME=`dirname $0` -PROGNAME=`basename $0` -OUTDIR=$1 -FORCE=$2 +DIRNAME=`dirname "$0"` +PROGNAME=`basename "$0"` -if [ ! "$OUTDIR" ]; then +if [ ! "$1" ] || [ "$1" = '--help' ] ; then cat 1>&2 < +Usage: $PROGNAME [ -f ] + +Sign archives in the given archive directory, invoking GPG to produce a +detached signature. If a signature already exists for an archive, it is not +regenerated unless the -f (force) option is given. + +All newly-created signature filenames are emitted on standard output. EOF exit 1 fi +OUTDIR=$1 +FORCE=$2 + if [ "$FORCE" != '-f' ]; then FORCE= fi @@ -27,6 +34,6 @@ OUTFILE="$FILENAME.asc" if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then gpg --sign -a -b "$FILENAME" + echo "$OUTFILE" fi - echo "$OUTFILE" done