Add commit sha1 to charybdis version

This commit is contained in:
ManiacTwister 2015-11-03 20:25:37 +01:00
parent a034b14fbf
commit ef70f680c5
2 changed files with 18 additions and 2 deletions

10
configure vendored
View file

@ -7858,6 +7858,13 @@ $as_echo "no" >&6; }
fi 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 cat >>confdefs.h <<_ACEOF
#define BRANDING_NAME "$BRANDING_NAME" #define BRANDING_NAME "$BRANDING_NAME"
@ -7865,10 +7872,11 @@ _ACEOF
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define BRANDING_VERSION "$BRANDING_VERSION" #define BRANDING_VERSION "${BRANDING_VERSION}-${GITSHA}"
_ACEOF _ACEOF
if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
$as_echo "#define CUSTOM_BRANDING 1" >>confdefs.h $as_echo "#define CUSTOM_BRANDING 1" >>confdefs.h

View file

@ -753,8 +753,16 @@ AC_HELP_STRING([--with-custom-version=NAME],
AC_MSG_RESULT([no])] 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_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 if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.]) AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.])