summaryrefslogtreecommitdiff
path: root/make_a_release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make_a_release.sh')
-rwxr-xr-xmake_a_release.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/make_a_release.sh b/make_a_release.sh
index c0b4807..1cf0f67 100755
--- a/make_a_release.sh
+++ b/make_a_release.sh
@@ -32,8 +32,8 @@ tag_name="v$new_ver"
echo "$new_ver" | egrep -q -x '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' ||
fatal "please, provide new version in X.Y.Z format"
-egrep -q -x 'VERSION = [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' Makefile ||
- fatal "Makefile does not contain \"Version = X.Y.Z\" line"
+egrep -q -x "m4_define\(\[RELEASE\], [0-9]+\.[0-9]+\.[0-9]+\)" configure.ac ||
+ fatal "configure.ac does not contain \"m4_define([RELEASE], X.Y.Z)\""
# Make sure the git index is up-to-date
[ -z "$(git status --porcelain)" ] || fatal "Git index is not up-to-date"
@@ -41,19 +41,23 @@ egrep -q -x 'VERSION = [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' Makefile ||
# Make sure the tag does not exist
[ -z "$(git tag -l "$tag_name")" ] || fatal "Tag $tag_name already exists"
-# Change the version in the Makefile
-sed -i -e "s/^VERSION = [[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/VERSION = $new_ver/" Makefile
+# Change the version in the configure.ac
+sed -i -e "s/^m4_define(\[RELEASE\], [0-9]\+.[0-9]\+.[0-9]\+)/m4_define([RELEASE], $new_ver)/" configure.ac
# And commit the change
-git commit -s -m "Release $release_name" Makefile
+git commit -s -m "Release $release_name" configure.ac
# Create new signed tag
echo "Signing tag $tag_name"
git tag -m "$release_name" -s "$tag_name"
# Prepare signed tarball
-git archive --format=tar --prefix="$release_name/" "$tag_name" | \
- bzip2 > "$outdir/$release_name.tar.bz2"
+./autogen.sh
+./configure
+make dist-bzip2
+mkdir -p "$outdir"
+mv "$release_name.tar.bz2" "$outdir"
+
echo "Signing the tarball"
gpg -o "$outdir/$release_name.tar.bz2.asc" --detach-sign -a "$outdir/$release_name.tar.bz2"