aboutsummaryrefslogtreecommitdiffstats
path: root/build/lib/BridgeVersion.java.txt
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib/BridgeVersion.java.txt')
-rw-r--r--build/lib/BridgeVersion.java.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/lib/BridgeVersion.java.txt b/build/lib/BridgeVersion.java.txt
index 95d41d201..4d82a700b 100644
--- a/build/lib/BridgeVersion.java.txt
+++ b/build/lib/BridgeVersion.java.txt
@@ -20,14 +20,18 @@ import java.util.Date;
/** release-specific version information */
public class Version {
+ // generated from build/lib/BridgeVersion.java
+
/** default version value for development version */
public static final String DEVELOPMENT = "DEVELOPMENT";
+ // VersionUptodate.java depends on this value
/** default time value for development version */
public static final long NOTIME = 0L;
/** set by build script */
public static final String text = "@build.version@";
+ // VersionUptodate.java scans for "static final String text = "
/**
* Time text set by build script using SIMPLE_DATE_FORMAT.
@@ -58,6 +62,24 @@ public class Version {
}
time = foundTime;
}
+
+ /**
+ * Test whether the version is as specified by any first argument.
+ * Emit text to System.err on failure
+ * @param args String[] with first argument equal to Version.text
+ * @see Version#text
+ */
+ public static void main(String[] args) {
+ if ((null != args) && (0 < args.length)) {
+ if (!Version.text.equals(args[0])) {
+ System.err.println("version expected: \""
+ + args[0]
+ + "\" actual=\""
+ + Version.text
+ + "\"");
+ }
+ }
+ }
}