aboutsummaryrefslogtreecommitdiff
path: root/bin/mk_rel.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mk_rel.bash')
-rwxr-xr-xbin/mk_rel.bash22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/mk_rel.bash b/bin/mk_rel.bash
index 3b206cc..41104a9 100755
--- a/bin/mk_rel.bash
+++ b/bin/mk_rel.bash
@@ -2,6 +2,14 @@
set -e
+function configure_ac_ver_ok {
+ cat configure.ac | grep "${1}" || return 1
+}
+
+function magit_el_ver_ok {
+ grep -e ";; Version: *$1" magit.el || return 1
+}
+
USAGE="usage: ${0##*/} <tag>"
tag="${1}"
@@ -20,6 +28,20 @@ fi
# grab that tag
git co "${tag}"
+# correct version in magit?
+if ! magit_el_ver_ok "$tag"; then
+ echo "Please set version in magit.el to $tag"
+ git co master
+ exit 1
+fi
+
+# correct version in configure.ac?
+if ! configure_ac_ver_ok "$tag"; then
+ echo "Please set AC_INIT to $tag in configure.ac"
+ git co master
+ exit 1
+fi
+
# clean up if we need to
[ -f Makefile ] && make distclean