mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Separate git commit subject line from comprevision, add SRB2_COMP_NOTE
This commit is contained in:
parent
f5b985bcc3
commit
55636fa690
7 changed files with 10 additions and 6 deletions
|
|
@ -11,8 +11,9 @@ include(GitUtilities)
|
||||||
git_current_branch(SRB2_COMP_BRANCH)
|
git_current_branch(SRB2_COMP_BRANCH)
|
||||||
git_working_tree_dirty(SRB2_COMP_UNCOMMITTED)
|
git_working_tree_dirty(SRB2_COMP_UNCOMMITTED)
|
||||||
|
|
||||||
git_summary(revision)
|
git_latest_commit(SRB2_COMP_REVISION)
|
||||||
string(REGEX REPLACE "([\"\\])" "\\\\\\1" SRB2_COMP_REVISION "${revision}")
|
git_subject(subject)
|
||||||
|
string(REGEX REPLACE "([\"\\])" "\\\\\\1" SRB2_COMP_NOTE "${subject}")
|
||||||
|
|
||||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
set(CMAKE_BUILD_TYPE None)
|
set(CMAKE_BUILD_TYPE None)
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ function(git_working_tree_dirty variable)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(git_summary variable)
|
function(git_subject variable)
|
||||||
_git_easy_command(log -1 "--format=%h %s")
|
_git_easy_command(log -1 --format=%s)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(get_git_dir variable)
|
function(get_git_dir variable)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
const char *compbranch = SRB2_COMP_BRANCH;
|
const char *compbranch = SRB2_COMP_BRANCH;
|
||||||
const char *comprevision = SRB2_COMP_REVISION;
|
const char *comprevision = SRB2_COMP_REVISION;
|
||||||
|
const char *compnote = SRB2_COMP_NOTE;
|
||||||
const char *comptype = CMAKE_BUILD_TYPE;
|
const char *comptype = CMAKE_BUILD_TYPE;
|
||||||
const int compoptimized = SRB2_COMP_OPTIMIZED;
|
const int compoptimized = SRB2_COMP_OPTIMIZED;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||||
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
|
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
|
||||||
|
#define SRB2_COMP_NOTE "${SRB2_COMP_NOTE}"
|
||||||
// This is done with configure_file instead of defines in order to avoid
|
// This is done with configure_file instead of defines in order to avoid
|
||||||
// recompiling the whole target whenever the working directory state changes
|
// recompiling the whole target whenever the working directory state changes
|
||||||
#cmakedefine SRB2_COMP_UNCOMMITTED
|
#cmakedefine SRB2_COMP_UNCOMMITTED
|
||||||
|
|
|
||||||
|
|
@ -4772,7 +4772,7 @@ static void Command_ListDoomednums_f(void)
|
||||||
static void Command_Version_f(void)
|
static void Command_Version_f(void)
|
||||||
{
|
{
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
CONS_Printf("Ring Racers %s %s (%s %s)\n", compbranch, comprevision, compdate, comptime);
|
CONS_Printf("Ring Racers %s %s %s (%s %s)\n", compbranch, comprevision, compnote, compdate, comptime);
|
||||||
#else
|
#else
|
||||||
CONS_Printf("Ring Racers %s (%s %s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision, compbranch);
|
CONS_Printf("Ring Racers %s (%s %s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision, compbranch);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -668,6 +668,7 @@ extern const char
|
||||||
*comptime,
|
*comptime,
|
||||||
*comprevision,
|
*comprevision,
|
||||||
*compbranch,
|
*compbranch,
|
||||||
|
*compnote,
|
||||||
*comptype;
|
*comptype;
|
||||||
extern int
|
extern int
|
||||||
compuncommitted,
|
compuncommitted,
|
||||||
|
|
|
||||||
|
|
@ -1913,7 +1913,7 @@ void F_VersionDrawer(void)
|
||||||
addtext(V_ALLOWLOWERCASE|V_REDMAP, "Netgame host for testers");
|
addtext(V_ALLOWLOWERCASE|V_REDMAP, "Netgame host for testers");
|
||||||
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", compdate));
|
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", compdate));
|
||||||
#elif defined(DEVELOP)
|
#elif defined(DEVELOP)
|
||||||
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, comprevision);
|
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s %s", comprevision, compnote));
|
||||||
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, compbranch);
|
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, compbranch);
|
||||||
#else // Regular build
|
#else // Regular build
|
||||||
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", VERSIONSTRING));
|
addtext(V_ALLOWLOWERCASE|V_TRANSLUCENT, va("%s", VERSIONSTRING));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue