Commit 107d2174 authored by halatmit's avatar halatmit

generate "none" as the buld version in the case where git describe fails

parent cf5332f6
...@@ -16,11 +16,14 @@ public final class GitBuildId { ...@@ -16,11 +16,14 @@ public final class GitBuildId {
private GitBuildId() { private GitBuildId() {
} }
public static String getVersion() { public static String getVersion() {
String version = GIT_BUILD_VERSION; String version = GIT_BUILD_VERSION;
// We can't use isEmpty() here because we want this to run // This catches the error returned by git describe
// in jdk 1.5 for the Blocks Editor // in the case where there is no description. In general
if (version.equals("")) { // the version needs to be a string that can be
// embedded into a legal file name. If it can't, then the
// blocks editor won't load.
if (version.contains(" ")) {
return "none" ; return "none" ;
} else { } else {
return version; return version;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment