Skip to content

Commit

Permalink
allow multi-revision based plugin revision
Browse files Browse the repository at this point in the history
  • Loading branch information
stoecker committed Sep 3, 2008
1 parent 0ba7e9c commit a93c512
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
17 changes: 17 additions & 0 deletions getrevision.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /usr/bin/perl

my $checkrev = qr/commit[ \n]+revision=\"(\d+)\">/;
my $text = `svn info --xml .`;
my $revision = $1 if $text =~ $checkrev;
foreach my $file (@ARGV)
{
my $ftext = `svn info --xml $file`;
my $frevision = $1 if $ftext =~ $checkrev;
if($frevision > $revision)
{
$text = $ftext;
$revision = $frevision;
}
}

print $text;
7 changes: 3 additions & 4 deletions osmarender/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
<copy todir="${plugin.build.dir}" file="${rendering}/osmarender.xsl"/>
<copy tofile="${plugin.build.dir}/osm-map-features.xml"
file="${rendering}/osm-map-features-z17.xml"/>
<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
<exec append="false" output="REVISION" executable="perl" failifexecutionfails="false">
<env key="LANG" value="C"/>
<arg value="info"/>
<arg value="--xml"/>
<arg value="."/>
<arg value="../getrevision.pl"/>
<arg value="osmarender"/>
</exec>
<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
<delete file="REVISION"/>
Expand Down
8 changes: 3 additions & 5 deletions slippy_map_chooser/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
<copy todir="build/images">
<fileset dir="images" />
</copy>
<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
<exec append="false" output="REVISION" executable="perl" failifexecutionfails="false">
<env key="LANG" value="C"/>
<arg value="info"/>
<arg value="--xml"/>
<arg value="."/>
<arg value="../getrevision.pl"/>
<arg value="src_jmv"/>
</exec>
<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
<delete file="REVISION"/>
Expand Down Expand Up @@ -61,5 +60,4 @@
<target name="install" depends="dist">
<copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
</target>

</project>

0 comments on commit a93c512

Please sign in to comment.