Browse Source

Updated some version code, and added a commons-cli dependancy

master
Drew Short 11 years ago
parent
commit
74c70e0ecc
  1. 5
      pom.xml
  2. 2
      src/main/scala/com/sothr/imagetools/util/PropertiesService.scala
  3. 6
      src/main/scala/com/sothr/imagetools/util/Version.scala

5
pom.xml

@ -88,6 +88,11 @@
<artifactId>jtransforms</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>

2
src/main/scala/com/sothr/imagetools/util/PropertiesService.scala

@ -60,7 +60,7 @@ object PropertiesService extends Logging {
val out:OutputStream = new FileOutputStream(location, false)
val cleanProperties = getCleanProperties
//insert special keys here
cleanProperties.setProperty("version.previous", version.toString())
cleanProperties.setProperty("version.previous", version.parsableToString())
cleanProperties.storeToXML(out, "User Properties")
out.flush()
out.close()

6
src/main/scala/com/sothr/imagetools/util/Version.scala

@ -52,8 +52,12 @@ class Version(val versionString:String) {
}
}
def parsableToString():String = {
s"$major.$minor.$patch-$buildTag-$buildNumber-$buildHash"
}
override def toString():String = {
return s"$major.$minor.$patch-$buildTag build:$buildNumber code:$buildHash"
s"$major.$minor.$patch-$buildTag build:$buildNumber code:$buildHash"
}
override def hashCode(): Int = {

Loading…
Cancel
Save