mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Remove "-0" from stable version numbers in a more foolproof manner for vs and cmake builds.
This commit is contained in:
parent
951d8e356a
commit
a279001472
@ -94,8 +94,8 @@ if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION)
|
|||||||
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
# remove hash from description
|
# remove hash (and trailing "-0" if needed) from description
|
||||||
STRING(REGEX REPLACE "-[^-]+((-dirty)?)$" "\\1" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
STRING(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
||||||
|
|
||||||
# defines DOLPHIN_WC_BRANCH
|
# defines DOLPHIN_WC_BRANCH
|
||||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||||
|
@ -58,9 +58,8 @@ var describe = GetFirstStdOutLine(gitexe + cmd_describe);
|
|||||||
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
|
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
|
||||||
var isMaster = +("master" == branch);
|
var isMaster = +("master" == branch);
|
||||||
|
|
||||||
// remove hash from description
|
// remove hash (and trailing "-0" if needed) from description
|
||||||
describe = describe.replace(/-[^-]+(-dirty)?$/, '$1');
|
describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2');
|
||||||
describe = describe.replace("-0","")
|
|
||||||
|
|
||||||
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