@ -153,7 +153,6 @@ public final class yacy {
sb . setConfig ( "parseableExt" , "html,htm,txt,php,shtml,asp" ) ;
// if we are running an SVN version, we try to detect the used svn revision now ...
if ( vString . equals ( "@" + "REPL_VERSION" + "@" ) ) {
Properties buildProp = new Properties ( ) ;
File buildPropFile = null ;
try {
@ -163,20 +162,22 @@ public final class yacy {
System . err . println ( "ERROR: " + buildPropFile . toString ( ) + " not found in settings path" ) ;
}
try {
if ( buildProp . containsKey ( "releaseNr" ) ) {
// this normally looks like this: $Revision: 181 $
String svnReleaseNrStr = buildProp . getProperty ( "releaseNr" ) ;
Pattern pattern = Pattern . compile ( "\\$Revision:\\s(.*)\\s\\$" , Pattern . DOTALL + Pattern . CASE_INSENSITIVE ) ;
Matcher matcher = pattern . matcher ( svnReleaseNrStr ) ;
if ( matcher . find ( ) ) {
String svrReleaseNr = matcher . group ( 1 ) ;
try {
if ( buildProp . containsKey ( "releaseNr" ) ) {
// this normally looks like this: $Revision: 181 $
String svnReleaseNrStr = buildProp . getProperty ( "releaseNr" ) ;
Pattern pattern = Pattern . compile ( "\\$Revision:\\s(.*)\\s\\$" , Pattern . DOTALL + Pattern . CASE_INSENSITIVE ) ;
Matcher matcher = pattern . matcher ( svnReleaseNrStr ) ;
if ( matcher . find ( ) ) {
String svrReleaseNr = matcher . group ( 1 ) ;
if ( vString . equals ( "@" + "REPL_VERSION" + "@" ) ) {
vString = "SVN " + svrReleaseNr ;
}
}
sb . setConfig ( "svnRevision" , svrReleaseNr ) ;
}
} catch ( Exception e ) {
System . err . println ( "Unable to determine the currently used SVN revision number." ) ;
}
} catch ( Exception e ) {
System . err . println ( "Unable to determine the currently used SVN revision number." ) ;
}
sb . setConfig ( "version" , vString ) ;