From: Sandro Santilli Date: Thu, 4 Jun 2015 08:09:52 +0000 (+0000) Subject: Embed full version (and revision) in package name for dev snapshots. X-Git-Tag: 2.2.0rc1~403 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8cc4b99c1bd7669b081f0a9083342a48e1e4209;p=postgis Embed full version (and revision) in package name for dev snapshots. git-svn-id: http://svn.osgeo.org/postgis/trunk@13614 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/make_dist.sh b/make_dist.sh index 46f9f294d..e3ab98f85 100755 --- a/make_dist.sh +++ b/make_dist.sh @@ -24,7 +24,6 @@ if [ -n "$1" ]; then fi outdir="postgis-$version" -package="postgis-$version.tar.gz" if [ -d "$outdir" ]; then echo "Output directory $outdir already exists." @@ -74,6 +73,21 @@ cd "$outdir" make distclean cd "$owd" +# Find a better version name when fetching +# a development branch +if test "$tag" = "trunk"; then + echo "Tweaking version for development snapshot" + VMAJ=`grep POSTGIS_MAJOR_VERSION "$outdir"/Version.config | cut -d= -f2` + VMIN=`grep POSTGIS_MINOR_VERSION "$outdir"/Version.config | cut -d= -f2` + VMIC=`grep POSTGIS_MICRO_VERSION "$outdir"/Version.config | cut -d= -f2` + VREV=`cat "$outdir"/postgis_svn_revision.h | awk '{print $3}'` + version="${VMAJ}.${VMIN}.${VMIC}-r${VREV}" + newoutdir=postgis-${version} + mv -vi "$outdir" "$newoutdir" + outdir=${newoutdir} +fi + +package="postgis-$version.tar.gz" echo "Generating $package file" tar czf "$package" "$outdir"