1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/docs/tools/make_releases.sh Sun Feb 02 18:52:34 2020 +0100
1.3 @@ -0,0 +1,39 @@
1.4 +#!/bin/sh
1.5 +
1.6 +DIRNAME=`dirname "$0"`
1.7 +PROGNAME=`basename "$0"`
1.8 +
1.9 +ARCHIVE=MoinLight
1.10 +
1.11 +if [ ! "$1" ] || [ "$1" = '--help' ] ; then
1.12 + cat 1>&2 <<EOF
1.13 +Usage: $PROGNAME <output directory> [ -f ]
1.14 +
1.15 +Make release archives from tags starting with "rel-" in the repository,
1.16 +storing the archives in the output directory. If an archive already exists for
1.17 +a release, it is not regenerated unless the -f (force) option is given.
1.18 +
1.19 +All newly-created archive filenames are emitted on standard output.
1.20 +EOF
1.21 + exit 1
1.22 +fi
1.23 +
1.24 +OUTDIR=$1
1.25 +FORCE=$2
1.26 +
1.27 +if [ "$FORCE" != '-f' ]; then
1.28 + FORCE=
1.29 +fi
1.30 +
1.31 +if [ ! -e "$OUTDIR" ]; then
1.32 + mkdir -p "$OUTDIR"
1.33 +fi
1.34 +
1.35 +for TAG in `hg tags | grep ^rel- | cut -f 1 -d ' '` ; do
1.36 + NUM=`echo "$TAG" | sed 's/rel-//;s/-/./g'`
1.37 + OUTFILE="$OUTDIR/$ARCHIVE-$NUM.tar.bz2"
1.38 + if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then
1.39 + hg archive -t tbz2 -r "$TAG" "$OUTFILE"
1.40 + echo "$OUTFILE"
1.41 + fi
1.42 +done