Add commit sha1 to charybdis version
This commit is contained in:
parent
a034b14fbf
commit
ef70f680c5
2 changed files with 18 additions and 2 deletions
10
configure
vendored
10
configure
vendored
|
@ -7858,6 +7858,13 @@ $as_echo "no" >&6; }
|
|||
fi
|
||||
|
||||
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
GITSHA=$(git rev-parse --short HEAD)
|
||||
else
|
||||
GITSHA="unknown"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define BRANDING_NAME "$BRANDING_NAME"
|
||||
|
@ -7865,10 +7872,11 @@ _ACEOF
|
|||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define BRANDING_VERSION "$BRANDING_VERSION"
|
||||
#define BRANDING_VERSION "${BRANDING_VERSION}-${GITSHA}"
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
|
||||
|
||||
$as_echo "#define CUSTOM_BRANDING 1" >>confdefs.h
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -753,8 +753,16 @@ AC_HELP_STRING([--with-custom-version=NAME],
|
|||
AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
GITSHA=$(git rev-parse --short HEAD)
|
||||
else
|
||||
GITSHA="unknown"
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(BRANDING_NAME, ["$BRANDING_NAME"], [Custom branding name.])
|
||||
AC_DEFINE_UNQUOTED(BRANDING_VERSION, ["$BRANDING_VERSION"], [Custom branding name.])
|
||||
AC_DEFINE_UNQUOTED(BRANDING_VERSION, ["${BRANDING_VERSION}-${GITSHA}"], [Custom branding name.])
|
||||
|
||||
|
||||
if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
|
||||
AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.])
|
||||
|
|
Loading…
Reference in a new issue