|
From: Zdenek S. <st...@us...> - 2017-03-19 18:02:40
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ipmitool".
The branch, master has been updated
via ba01dc84b4e225c86eac3f562e629662d752040f (commit)
from 497f7767cd8e80ad67d08680ae165271441017fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ba01dc84b4e225c86eac3f562e629662d752040f
Author: Alexander Amelkin <ale...@am...>
Date: Tue Feb 7 14:06:47 2017 +0300
Make git revision more descriptive
The previously introduced mechanism of generating
a git revision was only using the abbreviated hash.
That approach doesn't give a clue whether version
1.8.18.2c99bf6 is newer or older than 1.8.18.7f8d374.
The project uses tags, so `git describe` can be
employed to produce an incremental revision number
since the last tag. Version 1.8.18.13 is much more
understandable and comparable. Howerver that doesn't
answer the question "what codebase was used". To
address that, the abbreviated hash should also be
preserved. Hence, this commit introduces a new
versioning scheme like `1.8.18.13.gee01aa5`.
For git snapshots when git program is absent the
version will be like `1.8.18.0.gsnapshot`.
For cases when .git directory is missing (Release
compilation?) the suffix part will be omitted
completely yielding a version like `1.8.18`.
The suffix generation has been moved to the added
csv-revision script. The script is absolutely
POSIX-ly correct and doesn't require XSI or any
other POSIX extensions.
diff --git a/configure.ac b/configure.ac
index f7676c9..ad1657d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
dnl
dnl autoconf for ipmitool
dnl
-m4_define([git_suffix], m4_esyscmd_s(git describe --always --dirty=wc 2>/dev/null || echo git_snapshot))
-AC_INIT([ipmitool], [1.8.18.git_suffix])
+m4_define([git_suffix], m4_esyscmd_s(./csv-revision))
+AC_INIT([ipmitool], [1.8.18git_suffix])
AC_CONFIG_SRCDIR([src/ipmitool.c])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([foreign])
diff --git a/csv-revision b/csv-revision
new file mode 100755
index 0000000..289c133
--- /dev/null
+++ b/csv-revision
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+git describe --first-parent --tags 2>/dev/null | (
+ IFS=- read tag rev hash
+ if [ $? ] && [ -n "$rev" ]; then
+ echo .$rev.$hash
+ elif [ -d .git ]; then
+ echo .0.gsnapshot
+ fi
+)
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 4 ++--
csv-revision | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
create mode 100755 csv-revision
hooks/post-receive
--
ipmitool
|