* automatically hardcode build revision into each release

This commit is contained in:
Reinhard Pointner 2012-03-07 14:06:10 +00:00
parent db3be3e9d1
commit 96fdea340d
3 changed files with 12 additions and 2 deletions

View File

@ -357,6 +357,12 @@
<exclude name="**/*.java" />
</fileset>
</copy>
<!-- update application properties -->
<replace dir="${dir.build}" encoding="utf-8" summary="yes">
<include name="**/*.properties" />
<replacefilter token="@{svn.revision}" value="${svn.revision}" />
</replace>
</target>

View File

@ -31,7 +31,11 @@ public final class Settings {
public static int getApplicationRevisionNumber() {
return Integer.parseInt(getApplicationProperty("application.revision"));
try {
return Integer.parseInt(getApplicationProperty("application.revision"));
} catch (Exception e) {
return 0;
}
}

View File

@ -1,7 +1,7 @@
# application settings
application.name: FileBot
application.version: 2.5
application.revision: 905
application.revision: @{svn.revision}
# application updates
update.url = http://filebot.sourceforge.net/update.xml