I am trying to add an svn commit number to the front page of my basically
headless push app. However, I am apparently doing something stupid and missing
something obvious.
I added this to the top of the build.xml script for the app (after the project
tag):
<!-- Write current build and revision #s into Properties file. -->
<target name="updateBuildNumber">
<exec executable="svnversion" dir="" outputproperty="svn.revision" />
<echo>Revision: ${svn.revision}</echo>
<replaceregexp file="Resources/Properties"
match="RevisionNumber=(.*)"
replace="RevisionNumber=${svn.revision}" />
<property environment="env" />
<echo>Build Number: ${env.BUILD_NUMBER}</echo>
<replaceregexp file="Resources/Properties"
match="BuildNumber=(.*)"
replace="BuildNumber=${env.BUILD_NUMBER}" />
</target>
I added this to my Properties file for the app (At the top):
RevisionNumber=x
BuildNumber=x
However, the script is not substituting, and I am not getting anything other
than "x" with the following code in my Main.java class
public String revisionNumber =
ERXProperties.stringForKey("RevisionNumber");
public String buildNumber = ERXProperties.stringForKey("BuildNumber");
public String revisionNumber(){
System.out.println("buildNumber is " + buildNumber + " and
revisionNumber is " + revisionNumber);
return revisionNumber;
}
What blindingly obvious thing am I missing?
Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]