From a1e14503fd0d5ee614ad7a18432f0edd273ba6ff Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 24 Jun 2024 07:28:54 -0400 Subject: [PATCH] Bump version in other files, update makesrcdist to support checking. --- makesrcdist | 53 ++++++++++++++++++++++++++++++++++---- pdfio_native.nuspec | 4 +-- pdfio_native.redist.nuspec | 2 +- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/makesrcdist b/makesrcdist index 8f2e63b..ee68b08 100755 --- a/makesrcdist +++ b/makesrcdist @@ -2,18 +2,61 @@ # # makesrcdist - make a source distribution of pdfio. # +# Usage: +# +# ./makesrcdist [--snapshot] VERSION +# +# Support "--snapshot" option... +if test "$1" == "--snapshot"; then + shift + snapshot=1 +else + snapshot=0 +fi + +# Get version... if test $# != 1; then - echo "Usage: ./makesrcdist version" - exit 1 + echo "Usage: ./makesrcdist [--snapshot] VERSION" + exit 1 fi version=$1 -echo Creating tag for release... -git tag -m "Tag $version" v$version -git push origin v$version +# Check that version number has been updated everywhere... +if test $(grep AC_INIT configure.ac | awk '{print $2}') != "[$version],"; then + echo "Still need to update AC_INIT version in 'configure.ac'." + exit 1 +fi +if test $(grep PDFIO_VERSION= configure | awk -F \" '{print $2}') != "$version"; then + echo "Still need to run 'autoconf -f'." + exit 1 +fi + +if test $(grep '' pdfio_native.nuspec | sed -E -e '1,$s/^.*([0-9.]+).*$/\1/') != "$version"; then + echo "Still need to update version in 'pdfio_native.nuspec'." + exit 1 +fi + +if test $(grep '' pdfio_native.redist.nuspec | sed -E -e '1,$s/^.*([0-9.]+).*$/\1/') != "$version"; then + echo "Still need to update version in 'pdfio_native.redist.nuspec'." + exit 1 +fi + +if test $(grep PDFIO_VERSION pdfio.h | awk -F \" '{print $2}') != "$version"; then + echo "Still need to update PDFIO_VERSION in 'pdfio.h'." + exit 1 +fi + +# Tag release... +if test $snapshot = 0; then + echo Creating tag for release... + git tag -m "Tag $version" v$version + git push origin v$version +fi + +# Make source archives... echo Creating pdfio-$version.tar.gz... git archive --format tar --prefix=pdfio-$version/ HEAD | gzip -v9 >pdfio-$version.tar.gz gpg --detach-sign pdfio-$version.tar.gz diff --git a/pdfio_native.nuspec b/pdfio_native.nuspec index df07417..9f9bd66 100644 --- a/pdfio_native.nuspec +++ b/pdfio_native.nuspec @@ -3,7 +3,7 @@ pdfio_native PDFio Library for VS2019+ - 1.2.0 + 1.3.0 Michael R Sweet michaelrsweet https://github.com/michaelrsweet/pappl @@ -16,7 +16,7 @@ Copyright © 2019-2024 by Michael R Sweet pdf file native - + diff --git a/pdfio_native.redist.nuspec b/pdfio_native.redist.nuspec index 212425d..82aec53 100644 --- a/pdfio_native.redist.nuspec +++ b/pdfio_native.redist.nuspec @@ -3,7 +3,7 @@ pdfio_native.redist PDFio Library for VS2019+ - 1.2.0 + 1.3.0 Michael R Sweet michaelrsweet https://github.com/michaelrsweet/pappl