mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Remove hash from revision description for cmake and windows.
This commit is contained in:
parent
6a80b9989a
commit
1528c95fe9
@ -54,9 +54,13 @@ if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION)
|
|||||||
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
|
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
# defines DOLPHIN_WC_DESCRIBE
|
# defines DOLPHIN_WC_DESCRIBE
|
||||||
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --always --dirty
|
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
|
||||||
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# remove hash from description
|
||||||
|
STRING(REGEX REPLACE "-[^-]+(-dirty)?$" "\\1" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
||||||
|
|
||||||
# defines DOLPHIN_WC_BRANCH
|
# defines DOLPHIN_WC_BRANCH
|
||||||
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||||
OUTPUT_VARIABLE DOLPHIN_WC_BRANCH
|
OUTPUT_VARIABLE DOLPHIN_WC_BRANCH
|
||||||
|
@ -3,7 +3,7 @@ var oFS = new ActiveXObject("Scripting.FileSystemObject");
|
|||||||
|
|
||||||
var outfile = "./Src/scmrev.h";
|
var outfile = "./Src/scmrev.h";
|
||||||
var cmd_revision = " rev-parse HEAD";
|
var cmd_revision = " rev-parse HEAD";
|
||||||
var cmd_describe = " describe --always --dirty";
|
var cmd_describe = " describe --always --long --dirty";
|
||||||
var cmd_branch = " rev-parse --abbrev-ref HEAD";
|
var cmd_branch = " rev-parse --abbrev-ref HEAD";
|
||||||
|
|
||||||
function GetGitExe()
|
function GetGitExe()
|
||||||
@ -56,13 +56,10 @@ var gitexe = GetGitExe();
|
|||||||
var revision = GetFirstStdOutLine(gitexe + cmd_revision);
|
var revision = GetFirstStdOutLine(gitexe + cmd_revision);
|
||||||
var describe = GetFirstStdOutLine(gitexe + cmd_describe);
|
var describe = GetFirstStdOutLine(gitexe + cmd_describe);
|
||||||
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
|
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
|
||||||
var isMaster = 0
|
var isMaster = +("master" == branch);
|
||||||
|
|
||||||
// remove hash from description
|
// remove hash from description
|
||||||
describe = describe.replace(/-g\w+/, '');
|
describe = describe.replace(/-[^-]+(-dirty)?$/, '$1');
|
||||||
|
|
||||||
if (branch == "master")
|
|
||||||
isMaster = 1
|
|
||||||
|
|
||||||
var out_contents =
|
var out_contents =
|
||||||
"#define SCM_REV_STR \"" + revision + "\"\n" +
|
"#define SCM_REV_STR \"" + revision + "\"\n" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user