Add git hash (from refs/remotes/origin/master) to error reports.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-08-31 17:54:32 -05:00
parent e535a88840
commit c70fcb296f
2 changed files with 32 additions and 0 deletions

View File

@@ -171,6 +171,12 @@ public class ErrorHandler {
if (version != null && !version.equals("${pom.version}")) {
sb.append("**Version:** ");
sb.append(version);
String hash = Utils.getGitHash();
if (hash != null) {
sb.append(" (");
sb.append(hash.substring(0, 12));
sb.append(')');
}
sb.append('\n');
}
String timestamp = props.getProperty("build.date");