* workaround for non-working build property replacements

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6197 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
f1ori 16 years ago
parent f814e0fa81
commit d5e51cfd09

@ -14,6 +14,9 @@ public class yacyBuildProperties {
* returns the SVN-Revision Number as a String
*/
public static String getSVNRevision() {
if ("@REPL_REVISION_NR@".contains("@")) {
return "0";
}
return "@REPL_REVISION_NR@";
}
@ -21,6 +24,9 @@ public class yacyBuildProperties {
* returns the version String (e. g. 0.9)
*/
public static String getVersion() {
if ("@REPL_VERSION@".contains("@")) {
return "0.1";
}
return "@REPL_VERSION@";
}
@ -35,6 +41,9 @@ public class yacyBuildProperties {
* returns the date, when this release was build
*/
public static String getBuildDate() {
if ("@REPL_DATE@".contains("@")) {
return "19700101";
}
return "@REPL_DATE@";
}
@ -51,6 +60,9 @@ public class yacyBuildProperties {
* when YaCy was installed with a packagemanger
*/
public static String getRestartCmd() {
if ("@REPL_RESTARTCMD@".contains("@")) {
return "echo 'error'";
}
return "@REPL_RESTARTCMD@";
}
}

@ -230,9 +230,14 @@ public final class yacy {
sb.setConfig("htTemplatePath", "htroot/env/templates");
sb.setConfig("parseableExt", "html,htm,txt,php,shtml,asp");
int oldRev = Integer.parseInt(sb.getConfig("svnRevision", "0"));
sb.setConfig("svnRevision", yacyBuildProperties.getSVNRevision());
int oldRev;
try {
oldRev = Integer.parseInt(sb.getConfig("svnRevision", "0"));
} catch (NumberFormatException e) {
oldRev = 0;
}
int newRev = Integer.parseInt(yacyBuildProperties.getSVNRevision());
sb.setConfig("svnRevision", yacyBuildProperties.getSVNRevision());
// TODO: remove!
//sb.setConfig("version", Double.toString(version));

Loading…
Cancel
Save