Make make_scmrev.h.js recognize "stable" as a stable branch.
This commit is contained in:
parent
e47e4c677a
commit
6833c203a6
|
@ -65,7 +65,7 @@ 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 = +("master" == branch);
|
var isStable = +("master" == branch || "stable" == branch);
|
||||||
|
|
||||||
// remove hash (and trailing "-0" if needed) from description
|
// remove hash (and trailing "-0" if needed) from description
|
||||||
describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2');
|
describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2');
|
||||||
|
@ -74,7 +74,7 @@ var out_contents =
|
||||||
"#define SCM_REV_STR \"" + revision + "\"\n" +
|
"#define SCM_REV_STR \"" + revision + "\"\n" +
|
||||||
"#define SCM_DESC_STR \"" + describe + "\"\n" +
|
"#define SCM_DESC_STR \"" + describe + "\"\n" +
|
||||||
"#define SCM_BRANCH_STR \"" + branch + "\"\n" +
|
"#define SCM_BRANCH_STR \"" + branch + "\"\n" +
|
||||||
"#define SCM_IS_MASTER " + isMaster + "\n";
|
"#define SCM_IS_MASTER " + isStable + "\n";
|
||||||
|
|
||||||
// check if file needs updating
|
// check if file needs updating
|
||||||
if (out_contents == GetFileContents(outfile))
|
if (out_contents == GetFileContents(outfile))
|
||||||
|
|
Loading…
Reference in New Issue