mirror of
https://github.com/matrix-construct/construct
synced 2024-06-17 01:18:39 +02:00
configure.ac: Gather more information from git during configure.
This commit is contained in:
parent
ebdb0896bb
commit
c54e7f5afe
17
configure.ac
17
configure.ac
|
@ -5,7 +5,7 @@ dnl said functions need to be just about as complex as they already are.
|
|||
AC_PREREQ(2.63)
|
||||
AUTOMAKE_OPTIONS = 1.11
|
||||
|
||||
AC_INIT([construct], [1.0-pre])
|
||||
AC_INIT([construct], [1.0])
|
||||
AC_GNU_SOURCE
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
@ -1318,6 +1318,21 @@ dnl ***************************************************************************
|
|||
dnl Branding defined in the compilation
|
||||
dnl
|
||||
|
||||
VERSION_COMMIT_CMD="git rev-parse --short HEAD"
|
||||
RB_VERSION_COMMIT=`$VERSION_COMMIT_CMD`
|
||||
RB_DEFINE_UNQUOTED([VERSION_COMMIT], ["$RB_VERSION_COMMIT"], [Git commit at configuration time.])
|
||||
#CPPDEFINE([RB_VERSION_COMMIT], [`$VERSION_COMMIT_CMD`])
|
||||
|
||||
VERSION_BRANCH_CMD="git rev-parse --abbrev-ref HEAD"
|
||||
RB_VERSION_BRANCH=`$VERSION_BRANCH_CMD`
|
||||
RB_DEFINE_UNQUOTED([VERSION_BRANCH], ["$RB_VERSION_BRANCH"], [Git branch at configuration time.])
|
||||
#CPPDEFINE([RB_VERSION_BRANCH], [`$VERSION_BRANCH_CMD`])
|
||||
|
||||
VERSION_TAG_CMD="git describe --tags --abbrev=0 --dirty"
|
||||
RB_VERSION_TAG=`$VERSION_TAG_CMD`
|
||||
RB_DEFINE_UNQUOTED([VERSION_TAG], ["$RB_VERSION_TAG"], [Git tag at configuration time.])
|
||||
#CPPDEFINE([RB_VERSION_TAG], [`$VERSION_TAG_CMD`])
|
||||
|
||||
VERSION_CMD="git describe --tags"
|
||||
RB_VERSION=`$VERSION_CMD`
|
||||
RB_DEFINE_UNQUOTED([VERSION], ["$RB_VERSION"], [Version generated at configuration time.])
|
||||
|
|
|
@ -29,6 +29,9 @@ namespace ircd::info
|
|||
extern const string_view server_agent;
|
||||
|
||||
// Build information
|
||||
extern const string_view tag;
|
||||
extern const string_view branch;
|
||||
extern const string_view commit;
|
||||
extern const time_t configured_time;
|
||||
extern const time_t compiled_time;
|
||||
extern const time_t startup_time;
|
||||
|
|
18
ircd/info.cc
18
ircd/info.cc
|
@ -107,6 +107,24 @@ ircd::info::server_agent
|
|||
// IRCd / build information
|
||||
//
|
||||
|
||||
decltype(ircd::info::tag)
|
||||
ircd::info::tag
|
||||
{
|
||||
RB_VERSION_TAG
|
||||
};
|
||||
|
||||
decltype(ircd::info::branch)
|
||||
ircd::info::branch
|
||||
{
|
||||
RB_VERSION_BRANCH
|
||||
};
|
||||
|
||||
decltype(ircd::info::commit)
|
||||
ircd::info::commit
|
||||
{
|
||||
RB_VERSION_COMMIT
|
||||
};
|
||||
|
||||
decltype(ircd::info::configured_time)
|
||||
ircd::info::configured_time
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue