Add release target to Makefile
Add simple helper target to automate basic release steps:
* version bump
* prepare release commit
* git commit, tag and sign
For library projects:
* update debian/changelog from TODO-RELEASE
* cleanup TODO-RELEASE
For non-library projects:
* update debian/changelog from git log
Note: it requires bumpversion package to be installed, debian/control is
adjusted accordingly. The helper itself is installed to facilitate reuse
by other libraries.
N. B: you still have to manually adjust LIBVERSION in previous commit -
see TODO-RELEASE header for details.
Use it as follows:
make REL=minor release
The REL parameter defines which component of the version [1] to bump and
can be any of { major, minor, patch }.
[1] http://semver.org/
Change-Id: I790ceb958195b9f6cbabfe8c977dc30e2bd7414b
Related: OS#1861
diff --git a/Makefile.am b/Makefile.am
index b8de3ca..8b35856 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,13 +7,20 @@
pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \
libosmogb.pc libosmoctrl.pc libosmocoding.pc
+@RELMAKE@
+
+relengdir = $(includedir)
+releng_DATA = osmo-release.mk
+
+osmo-release.mk: git-version-gen
+
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
-EXTRA_DIST = git-version-gen .version README.md
+EXTRA_DIST = git-version-gen .version README.md osmo-release.mk
if HAVE_DOXYGEN