diff --git a/pom.xml b/pom.xml
index f3f0639..469ae9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,6 +88,11 @@
jtransforms
2.4.0
+
+ commons-cli
+ commons-cli
+ 1.2
+
diff --git a/src/main/scala/com/sothr/imagetools/util/PropertiesService.scala b/src/main/scala/com/sothr/imagetools/util/PropertiesService.scala
index ad7baf3..4463bca 100644
--- a/src/main/scala/com/sothr/imagetools/util/PropertiesService.scala
+++ b/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()
diff --git a/src/main/scala/com/sothr/imagetools/util/Version.scala b/src/main/scala/com/sothr/imagetools/util/Version.scala
index e81864d..7b07742 100644
--- a/src/main/scala/com/sothr/imagetools/util/Version.scala
+++ b/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 = {