Skip to content

Commit 4f123c2

Browse files
committed
Update makesrcdist script to report all issues before exiting and fix major/minor version checks.
1 parent c4c8fa6 commit 4f123c2

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

makesrcdist

+20-10
Original file line numberDiff line numberDiff line change
@@ -21,50 +21,60 @@ if test $# != 1; then
2121
exit 1
2222
fi
2323

24+
status=0
2425
version=$1
2526
version_major=$(echo $1 | awk -F. '{print $1}')
2627
version_minor=$(echo $1 | awk -F. '{print $2}')
2728

2829
# Check that version number has been updated everywhere...
2930
if test $(grep AC_INIT configure.ac | awk '{print $2}') != "[$version],"; then
3031
echo "Still need to update AC_INIT version in 'configure.ac'."
31-
exit 1
32+
status=1
3233
fi
3334

3435
if test $(head -4 CHANGES.md | tail -1 | awk '{print $1}') != "v$version"; then
3536
echo "Still need to update CHANGES.md version number."
36-
exit 1
37+
status=1
3738
fi
3839
if test $(head -4 CHANGES.md | tail -1 | awk '{print $3}') = "YYYY-MM-DD"; then
3940
echo "Still need to update CHANGES.md release date."
40-
exit 1
41+
status=1
4142
fi
4243

4344
if test $(grep PDFIO_VERSION= configure | awk -F \" '{print $2}') != "$version"; then
4445
echo "Still need to run 'autoconf -f'."
45-
exit 1
46+
status=1
4647
fi
4748

4849
if test $(grep '<version>' pdfio_native.nuspec | sed -E -e '1,$s/^.*<version>([0-9.]+).*$/\1/') != "$version"; then
4950
echo "Still need to update version in 'pdfio_native.nuspec'."
50-
exit 1
51+
status=1
5152
fi
5253

5354
if test $(grep '<version>' pdfio_native.redist.nuspec | sed -E -e '1,$s/^.*<version>([0-9.]+).*$/\1/') != "$version"; then
5455
echo "Still need to update version in 'pdfio_native.redist.nuspec'."
55-
exit 1
56+
status=1
5657
fi
5758

5859
if test $(grep PDFIO_VERSION pdfio.h | awk -F \" '{print $2}') != "$version"; then
5960
echo "Still need to update PDFIO_VERSION in 'pdfio.h'."
60-
exit 1
61+
status=1
6162
fi
62-
if test $(grep PDFIO_VERSION_MAJOR pdfio.h | awk '{print $3}') != "$version_major"; then
63+
if test $(grep PDFIO_VERSION_MAJOR pdfio.h | awk '{print $4}') != "$version_major"; then
6364
echo "Still need to update PDFIO_VERSION_MAJOR in 'pdfio.h'."
64-
exit 1
65+
status=1
6566
fi
66-
if test $(grep PDFIO_VERSION_MINOR pdfio.h | awk '{print $3}') != "$version_minor"; then
67+
if test $(grep PDFIO_VERSION_MINOR pdfio.h | awk '{print $4}') != "$version_minor"; then
6768
echo "Still need to update PDFIO_VERSION_MINOR in 'pdfio.h'."
69+
status=1
70+
fi
71+
72+
if test $(grep VERSION pdfio1.def | awk '{print $2}') != "$version_major.$version_minor"; then
73+
echo "Still need to update VERSION in 'pdfio1.def'."
74+
status=1
75+
fi
76+
77+
if test $status = 1; then
6878
exit 1
6979
fi
7080

0 commit comments

Comments
 (0)