source: osm/applications/editors/josm/dist/getversions@ 35895

Last change on this file since 35895 was 35501, checked in by stoecker, 4 years ago

skip javadoc and sources

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#! /usr/bin/perl -w
2
3my $oldsvn = 0; # before 1.7
4my $maxlength = 0;
5my @names = glob "*.jar";
6
7foreach my $plugin (@names)
8{
9 my $l = length($plugin);
10 $maxlength = $l if $l > $maxlength;
11}
12
13system "svn -q export -r BASE . getrev" if !$oldsvn;
14foreach my $plugin (@names)
15{
16 next if $plugin =~ /-(javadoc|sources)\.jar$/;
17 my $date = "";
18 my $version = "";
19 my $mversion = "";
20 my $manifest = `unzip -c $plugin META-INF/MANIFEST.MF`;
21 if($manifest)
22 {
23 $date = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
24 $version = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
25 $mversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
26 }
27 printf "%-${maxlength}s %28s %10s (%5s)", $plugin,$date,$version,$mversion;
28 my $svnfile = $oldsvn ? ".svn/text-base/$plugin.svn-base" : "getrev/$plugin";
29 if(-f $svnfile && ($manifest = `unzip -c $svnfile META-INF/MANIFEST.MF`))
30 {
31 my $svndate = "";
32 my $svnversion = "";
33 my $svnmversion = "";
34 $svndate = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
35 $svnversion = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
36 $svnmversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
37 my $changed = ($svndate ne $date || $svnversion ne $version);
38 my $changedm = $svnmversion ne $mversion;
39 printf " SVN: %28s %10s (%5s)%s%s", $svndate,$svnversion,$svnmversion,
40 $changed ? " changed" : "", $changedm ? " main" : "";
41 `svn revert $plugin` if !$changed && !$changedm;
42 }
43 printf "\n";
44}
45system "rm -rf getrev" if !$oldsvn;
Note: See TracBrowser for help on using the repository browser.