aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--check_version21
2 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a43dbbd..45ab4ea 100644
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,7 @@ push: all man html
git push
release:
+ sh ./check_version $(VERSION)
mkdir $(PROJ)-$(VERSION)
cp $(PROJ).c $(PROJ).1 $(PROJ).rst $(DOCS) $(PROJ)-$(VERSION)
tar cvfJ $(PROJ)-$(VERSION).tar.xz $(PROJ)-$(VERSION)
diff --git a/check_version b/check_version
new file mode 100644
index 0000000..e42a865
--- /dev/null
+++ b/check_version
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+X=0
+
+VER="$( sed -n '1s,.* v,,p' README )"
+if [ "$VER" != "$1" ]; then
+ echo
+ echo "*** You forgot to update the version at the top of README"
+ echo
+ X=1
+fi
+
+VER="$( sed -n '/^\.\. |version| replace:: /s,.* ,,p' miragextract.rst )"
+if [ "$VER" != "$1" ]; then
+ echo
+ echo "*** You forgot to update the version in miragextract.rst"
+ echo
+ X=1
+fi
+
+exit $X