gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0f4762)
raw | patch | inline | side by side (parent: a0f4762)
author | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 20 Apr 2016 16:05:58 +0000 (18:05 +0200) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Wed, 20 Apr 2016 16:05:58 +0000 (18:05 +0200) |
updated the version name loader, removed error displays since they
are irrelevant.
updates to the ant build to reflect the new name.
are irrelevant.
updates to the ant build to reflect the new name.
build.xml | patch | blob | history | |
res/com/quemaster/transformations/mjc2wsl/version.properties | [new file with mode: 0644] | patch | blob |
res/version.properties | [deleted file] | patch | blob | history |
src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java | patch | blob | history |
diff --git a/build.xml b/build.xml
--- a/build.xml
+++ b/build.xml
<property name="log.file.tests.m" value="${log.dir}/tests-mj" />
<property name="log.file.tests.t" value="${log.dir}/tests-wsl" />
- <property name="version.file" value="${res.dir}/version.properties" />
+ <property name="version.file" value="${res.dir}/com/quemaster/transformations/mjc2wsl/version.properties" />
<!-- **************************************** -->
<!-- patterns -->
<target name="-store-version-string" if="version">
<!-- store the new version string in the correct property file -->
<echo message="version=${version}"/>
+ <dirname file="${version.file}" property="version.file.dir"/>
+ <mkdir dir="${version.file.dir}" />
<propertyfile file="${version.file}">
<entry key="version" value="${version}"/>
</propertyfile>
diff --git a/res/com/quemaster/transformations/mjc2wsl/version.properties b/res/com/quemaster/transformations/mjc2wsl/version.properties
--- /dev/null
@@ -0,0 +1,2 @@
+#Mon, 18 Aug 2014 20:45:53 +0200
+version=v0.2.0
diff --git a/res/version.properties b/res/version.properties
--- a/res/version.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#Mon, 18 Aug 2014 20:45:53 +0200
-version=v0.2.0
diff --git a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java
//default version name, used if the file is not found
private static String versionN = "v0.2.x";
- private String versionFile = "/version.properties";
+ private String versionFile = "version.properties";
private TransMessages messages = new TransMessages();
versionData = new Properties();
try {
versionData.load(getClass().getResourceAsStream(versionFile));
- } catch (IOException e) {
- e.printStackTrace();
+ } catch (IOException | NullPointerException e) {
+ // it doesn't matter
+ //e.printStackTrace();
}
}
String ver = versionData.getProperty("version");