Extract version from GIT, inspiration from mdio-tools
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
029115a23e
commit
da7425f757
22
Makefile.am
22
Makefile.am
@ -25,9 +25,10 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
SUBDIRS = example man src test
|
|
||||||
doc_DATA = README.md LICENSE ChangeLog.md syslog.conf
|
doc_DATA = README.md LICENSE ChangeLog.md syslog.conf
|
||||||
EXTRA_DIST = README.md LICENSE ChangeLog.md syslog.conf
|
EXTRA_DIST = README.md LICENSE ChangeLog.md syslog.conf
|
||||||
|
SUBDIRS = example man src test
|
||||||
|
TAG = $(top_srcdir)/.git/refs/tags/$(PACKAGE_VERSION)
|
||||||
|
|
||||||
if HAVE_SYSTEMD
|
if HAVE_SYSTEMD
|
||||||
systemd_DATA = syslogd.service
|
systemd_DATA = syslogd.service
|
||||||
@ -36,22 +37,9 @@ endif
|
|||||||
#
|
#
|
||||||
# Check if tagged in git
|
# Check if tagged in git
|
||||||
#
|
#
|
||||||
release-hook:
|
$(TAG):
|
||||||
@if [ ! `git tag -l v$(PACKAGE_VERSION) | grep $(PACKAGE_VERSION)` ]; then \
|
@printf "\e[1m\e[41mPlease create the \"$(PACKAGE_VERSION)\" tag first\e[0m\n"
|
||||||
echo; \
|
@exit 1
|
||||||
printf "\e[1m\e[41mCannot find release tag $(PACKAGE_VERSION)\e[0m\n"; \
|
|
||||||
printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn; \
|
|
||||||
if [ "$$yorn" != "y" -a "$$yorn" != "Y" ]; then \
|
|
||||||
printf "OK, aborting release.\n"; \
|
|
||||||
exit 1; \
|
|
||||||
fi; \
|
|
||||||
echo; \
|
|
||||||
else \
|
|
||||||
echo; \
|
|
||||||
printf "\e[1m\e[42mFound GIT release tag $(PACKAGE_VERSION)\e[0m\n"; \
|
|
||||||
printf "\e[1m\e[44m>>Remember to push tags!\e[0m\n"; \
|
|
||||||
echo; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate .deb package(s)
|
# Generate .deb package(s)
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
AC_INIT([sysklogd], [2.3.0-beta1], [https://github.com/troglobit/sysklogd/issues],,
|
AC_INIT([sysklogd], m4_esyscmd_s(git describe --always --dirty --tags),
|
||||||
[https://github.com/troglobit/sysklogd])
|
[https://github.com/troglobit/sysklogd/issues],,[https://github.com/troglobit/sysklogd])
|
||||||
AC_CONFIG_AUX_DIR(aux)
|
AC_CONFIG_AUX_DIR(aux)
|
||||||
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
|
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
|
||||||
LT_INIT([pic-only])
|
LT_INIT([pic-only])
|
||||||
|
Loading…
Reference in New Issue
Block a user