Commit 9003eb28 authored by Daniel Salzman's avatar Daniel Salzman

configure: allow extended version suppression via KNOT_VERSION_FORMAT=release

parent eec246a5
......@@ -4,6 +4,8 @@
# <MAJOR>.<MINOR>.dev[.<TIMESTAMP>.<HASH>] Build from the master branch
# <MAJOR>.<MINOR>.<PATCH>[.<TIMESTAMP>.<HASH>] Build from a feature branch
#
# To force release version format set env variable KNOT_VERSION_FORMAT=release
#
# If the repository is not available or if HEAD is tagged,
# the optional part is missing!
#
......@@ -11,9 +13,11 @@
################################################################################
m4_define([knot_PATCH], m4_ifblank(knot_VERSION_PATCH, [dev], knot_VERSION_PATCH))dnl
m4_define([knot_GIT_HASH], m4_esyscmd_s(git rev-parse --short HEAD 2>/dev/null))dnl
m4_define([knot_GIT_TAG], m4_esyscmd_s(git describe --exact-match 2>/dev/null))dnl
m4_define([knot_TIMESTAMP], m4_esyscmd_s(date -u +'%s' 2>/dev/null))dnl
m4_define([knot_GIT_INFO], m4_ifblank(knot_GIT_TAG, m4_ifnblank(knot_GIT_HASH, .knot_TIMESTAMP.knot_GIT_HASH, []), []))dnl
m4_define([knot_GIT_OK], m4_case(m4_esyscmd_s(echo $KNOT_VERSION_FORMAT 2>/dev/null), release, [], knot_GIT_HASH))dnl
m4_define([knot_GIT_INFO], m4_ifblank(knot_GIT_TAG, m4_ifnblank(knot_GIT_OK, .knot_TIMESTAMP.knot_GIT_HASH, []), []))dnl
m4_define([knot_PKG_VERSION], [knot_VERSION_MAJOR.knot_VERSION_MINOR.knot_PATCH]knot_GIT_INFO)dnl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment