Skip to content
Browse files

added new sub command 'version' to allow the version to be determined…

… quicker
  • Loading branch information...
1 parent b398ff9 commit c5a024b35cbc3f65205ba8541c8e341fc327b0ea CSH committed Apr 13, 2012
View
2 pom.xml
@@ -4,7 +4,7 @@
<groupId>uk.co.ignesco</groupId>
<artifactId>chime.teb</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>teb</name>
View
1 src/main/java/uk/co/ignesco/teb/api/Teb.java
@@ -23,6 +23,7 @@
* @author craig
*/
public class Teb {
+ static public final String TEB_VERSION = "1.1.2";
static private final String TEB_WD = ".teb";
static public final String TEB_MANIFEST_LOCATOR_FILENAME = "tebmanifestlocator.xml";
static public final String TEB_MANIFEST_FILENAME = "teb.xml";
View
13 src/main/java/uk/co/ignesco/teb/main/TebCommandLineProcessor.java
@@ -13,7 +13,7 @@
*
* @author craig
*/
-public class TebCommandLineProcessor {
+public class TebCommandLineProcessor {
public void process(File currentWorkingDirectory, String[] args) {
boolean foundCommand = false;
try {
@@ -61,6 +61,9 @@ public void process(File currentWorkingDirectory, String[] args) {
} else if(args[0].equals("reinit")) {
foundCommand = true;
teb.reinit();
+ } else if(args[0].equals("version")) {
+ foundCommand = true;
+ outputVersionDescription();
}
}
@@ -71,9 +74,13 @@ public void process(File currentWorkingDirectory, String[] args) {
System.out.println("Teb error ("+e.getMessage()+")");
}
}
+
+ private void outputVersionDescription() {
+ System.out.println("Teb repository manager (version "+ Teb.TEB_VERSION +")");
+ }
private void outputSyntax() {
- System.out.println("Teb repository manager (version 1.1.1)");
+ outputVersionDescription();
System.out.println("Syntax:");
System.out.println("\tteb COMMAND");
System.out.println("\t init TEB_REPO_LOCATION [MANIFEST_FILENAME] \n\t This command initialises a teb repo in the current working directory using the arguments passed on the commandline");
@@ -91,5 +98,7 @@ private void outputSyntax() {
System.out.println("");
System.out.println("\t reinit - fetch and rebase the teb manifest repo and clone any new projects");
System.out.println("");
+ System.out.println("\t version - show version information for this teb command");
+ System.out.println("");
}
}
View
2 teb
@@ -1,2 +1,2 @@
#!/bin/bash
-java -jar $HOME/.m2/repository/uk/co/ignesco/chime.teb/1.1.1-SNAPSHOT/chime.teb-1.1.1-SNAPSHOT.jar "$@"
+java -jar $HOME/.m2/repository/uk/co/ignesco/chime.teb/1.1.2-SNAPSHOT/chime.teb-1.1.2-SNAPSHOT.jar "$@"

0 comments on commit c5a024b

Please sign in to comment.
Something went wrong with that request. Please try again.