Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove "-0" from stable version numbers in a more foolproof manner fo…
…r vs and cmake builds.
  • Loading branch information
jordan-woyak committed Aug 10, 2013
1 parent 951d8e3 commit a279001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions Source/Core/Common/make_scmrev.h.js
Expand Up @@ -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" +
Expand Down

0 comments on commit a279001

Please sign in to comment.