get (and use) shorthash
This commit is contained in:
parent
1c4a067547
commit
4cce5c2cf7
|
@ -160,9 +160,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void AboutBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
Text = "BizHawk Developer Build (DEBUG MODE) GIT " + SubWCRev.GIT_BRANCH + "-"+SubWCRev.SVN_REV;
|
||||
Text = "BizHawk Developer Build (DEBUG MODE) GIT " + SubWCRev.GIT_BRANCH + "-" + SubWCRev.SVN_REV + "#" + SubWCRev.GIT_SHORTHASH;
|
||||
#else
|
||||
Text = "BizHawk Developer Build (RELEASE MODE) GIT " + SubWCRev.GIT_BRANCH + "-"+SubWCRev.SVN_REV;
|
||||
Text = "BizHawk Developer Build (RELEASE MODE) GIT " + SubWCRev.GIT_BRANCH + "-"+SubWCRev.SVN_REV + "#" + SubWCRev.GIT_SHORTHASH;
|
||||
#endif
|
||||
if (DateTime.Now.Month == 12)
|
||||
if (DateTime.Now.Day > 17 && DateTime.Now.Day <= 25)
|
||||
|
|
|
@ -28,11 +28,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (VersionInfo.DeveloperBuild)
|
||||
{
|
||||
Text = " BizHawk (GIT " + SubWCRev.GIT_BRANCH + "-" + SubWCRev.SVN_REV + ")";
|
||||
Text = " BizHawk (GIT " + SubWCRev.GIT_BRANCH + "-" + SubWCRev.SVN_REV + "#" + SubWCRev.GIT_SHORTHASH + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = "Version " + VersionInfo.MAINVERSION + " (GIT " + SubWCRev.GIT_BRANCH + "-" + SubWCRev.SVN_REV + ")";
|
||||
Text = "Version " + VersionInfo.MAINVERSION + " (GIT " + SubWCRev.GIT_BRANCH + "-" + SubWCRev.SVN_REV + "#" + SubWCRev.GIT_SHORTHASH + ")";
|
||||
}
|
||||
|
||||
VersionLabel.Text = "Version " + VersionInfo.MAINVERSION + " " + VersionInfo.RELEASEDATE;
|
||||
|
|
Binary file not shown.
|
@ -94,6 +94,9 @@ namespace BizHawk.Build.Tool
|
|||
//pick branch unnamed in case investigation fails (or isnt git)
|
||||
string branch = "";
|
||||
|
||||
//pick no hash in case investigation fails (or isnt git)
|
||||
string shorthash = "";
|
||||
|
||||
//try to find an SVN or GIT and run it
|
||||
if (svn)
|
||||
{
|
||||
|
@ -127,6 +130,10 @@ namespace BizHawk.Build.Tool
|
|||
output = RunTool(gittool, "-C", wcdir, "rev-parse", "--abbrev-ref", "HEAD");
|
||||
if(output.StartsWith("fatal")) {}
|
||||
else branch = output;
|
||||
|
||||
output = RunTool(gittool, "-C", wcdir, "log", "-1", "--format=\"%h\"");
|
||||
if (output.StartsWith("fatal")) { }
|
||||
else shorthash = output;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -139,6 +146,7 @@ namespace BizHawk.Build.Tool
|
|||
//replace the template and dump the results if needed
|
||||
templateContents = templateContents.Replace("$WCREV$", rev.ToString());
|
||||
templateContents = templateContents.Replace("$WCBRANCH$", branch);
|
||||
templateContents = templateContents.Replace("$WCSHORTHASH$", shorthash);
|
||||
WriteTextIfChanged(outfile, templateContents);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,4 +2,5 @@ static class SubWCRev
|
|||
{
|
||||
public const string SVN_REV = "$WCREV$";
|
||||
public const string GIT_BRANCH = "$WCBRANCH$";
|
||||
public const string GIT_SHORTHASH = "$WCSHORTHASH$";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue