2012-09-25 04:24:56 +02:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# mkrel
|
|
|
|
#
|
|
|
|
# Create a release for distribution.
|
|
|
|
# This is a wrapper for mkrelease that syncs to the
|
|
|
|
# Perforce head revision, reads the current
|
|
|
|
# version from $POCO_BASE/VERSION and requires a release
|
|
|
|
# specification (loaded from $POCO_BASE/release/spec/*.release)
|
|
|
|
# as argument.
|
|
|
|
#
|
|
|
|
# usage: mkrel [<specfile>]
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ "$POCO_BASE" = "" ] ; then
|
|
|
|
echo "Error: POCO_BASE not set."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $POCO_BASE
|
|
|
|
|
|
|
|
if [ ! -f VERSION ] ; then
|
|
|
|
echo "Error: No VERSION file found."
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
case `uname` in
|
|
|
|
CYGWIN*) cygwin=1
|
|
|
|
;;
|
|
|
|
*) cygwin=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
label=""
|
|
|
|
spec=""
|
2012-12-26 05:43:02 +01:00
|
|
|
lineEndConv=""
|
2017-11-08 07:58:43 +01:00
|
|
|
while [ "$1" != "" ] ;
|
2012-09-25 04:24:56 +02:00
|
|
|
do
|
|
|
|
if [ "$1" = "-l" ] ; then
|
|
|
|
shift
|
|
|
|
label=@$1
|
|
|
|
shift
|
2012-12-26 05:43:02 +01:00
|
|
|
elif [ "$1" = "-c" ] ; then
|
|
|
|
shift
|
|
|
|
lineEndConv=$1
|
2022-07-07 11:18:20 +02:00
|
|
|
shift
|
2012-09-25 04:24:56 +02:00
|
|
|
else
|
|
|
|
spec=$1
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$spec" != "" ] ; then
|
|
|
|
relspec="-f release/spec/${spec}.release"
|
|
|
|
reltag="-$spec"
|
|
|
|
else
|
|
|
|
relspec=""
|
|
|
|
reltag=""
|
|
|
|
fi
|
|
|
|
|
2012-12-26 05:43:02 +01:00
|
|
|
if [ "$lineEndConv" != "" ] ; then
|
|
|
|
lnendcvt="-c ${lineEndConv}"
|
|
|
|
fi
|
|
|
|
|
2012-09-25 04:24:56 +02:00
|
|
|
if [ $cygwin ] ; then
|
|
|
|
export PWD=`cygpath -w $POCO_BASE`
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Sync files
|
|
|
|
#
|
2013-07-23 15:04:48 +02:00
|
|
|
if [ "$label" != "" ] ; then
|
|
|
|
echo "Syncing files to ${label}..."
|
|
|
|
p4 sync ./...$label
|
|
|
|
fi
|
2012-09-25 04:24:56 +02:00
|
|
|
|
|
|
|
read version <$POCO_BASE/VERSION
|
|
|
|
release=$version$reltag
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build release
|
|
|
|
#
|
|
|
|
echo "Building release $release"
|
|
|
|
|
|
|
|
rm -rf releases/poco-$release.*
|
2012-12-26 05:43:02 +01:00
|
|
|
$POCO_BASE/release/script/mkrelease $release $relspec $lnendcvt
|
2012-09-25 04:24:56 +02:00
|
|
|
|