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_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# remove hash from description
|
||||
STRING(REGEX REPLACE "-[^-]+((-dirty)?)$" "\\1" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
||||
# remove hash (and trailing "-0" if needed) from description
|
||||
STRING(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}")
|
||||
|
||||
# defines DOLPHIN_WC_BRANCH
|
||||
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 isMaster = +("master" == branch);
|
||||
|
||||
// remove hash from description
|
||||
describe = describe.replace(/-[^-]+(-dirty)?$/, '$1');
|
||||
describe = describe.replace("-0","")
|
||||
// remove hash (and trailing "-0" if needed) from description
|
||||
describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2');
|
||||
|
||||
var out_contents =
|
||||
"#define SCM_REV_STR \"" + revision + "\"\n" +
|
||||
|
|
Loading…
Reference in New Issue