From df58633baabd89fe850ed55ff5308ade73fd76c2 Mon Sep 17 00:00:00 2001 From: hayesall Date: Fri, 3 Jun 2022 12:15:03 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20`-v`/`-version`=20command-lin?= =?UTF-8?q?e=20argument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently this sets the `SRLBoost` version to `0.1.1` for further development beyond the `0.1.0` tag. --- .../wisc/cs/will/Boosting/Utils/CommandLineArguments.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/edu/wisc/cs/will/Boosting/Utils/CommandLineArguments.java b/src/main/java/edu/wisc/cs/will/Boosting/Utils/CommandLineArguments.java index e0b479c..9d2dd84 100644 --- a/src/main/java/edu/wisc/cs/will/Boosting/Utils/CommandLineArguments.java +++ b/src/main/java/edu/wisc/cs/will/Boosting/Utils/CommandLineArguments.java @@ -23,6 +23,8 @@ public CommandLineArguments() { * 5. Define a usage string in getUsageString */ + public static final String srlboost_version = "0.1.1"; + private static final String argPrefix = "-"; private static final String learn = "l"; @@ -165,6 +167,11 @@ public boolean parseArgs(String[] args) { if (args[i].trim().isEmpty()) continue; + if (argMatches(args[i], "v") || argMatches(args[i], "version")) { + System.out.println(srlboost_version); + System.exit(0); + } + if (argMatches(args[i], "h") || argMatches(args[i], "help")) { System.out.println(getUsageString()); System.exit(0);