You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/06/07 06:02:37 UTC
svn commit: r1347378 - in /openejb/site/trunk/cgi-bin: builds.cgi latest.cgi
Author: dblevins
Date: Thu Jun 7 04:02:36 2012
New Revision: 1347378
URL: http://svn.apache.org/viewvc?rev=1347378&view=rev
Log:
finally cracked a script that can list builds from nexus
Added:
openejb/site/trunk/cgi-bin/builds.cgi (contents, props changed)
- copied, changed from r1347327, openejb/site/trunk/cgi-bin/latest.cgi
Removed:
openejb/site/trunk/cgi-bin/latest.cgi
Copied: openejb/site/trunk/cgi-bin/builds.cgi (from r1347327, openejb/site/trunk/cgi-bin/latest.cgi)
URL: http://svn.apache.org/viewvc/openejb/site/trunk/cgi-bin/builds.cgi?p2=openejb/site/trunk/cgi-bin/builds.cgi&p1=openejb/site/trunk/cgi-bin/latest.cgi&r1=1347327&r2=1347378&rev=1347378&view=diff
==============================================================================
--- openejb/site/trunk/cgi-bin/latest.cgi (original)
+++ openejb/site/trunk/cgi-bin/builds.cgi Thu Jun 7 04:02:36 2012
@@ -4,11 +4,32 @@ use strict;
use warnings;
print "Content-Type: text/html\n\n";
+my $artifact = "/apache-tomee/1.0.1-SNAPSHOT/";
+$artifact = $ENV{PATH_INFO} if $ENV{PATH_INFO};
-my $a = "apache-tomee/1.0.1-SNAPSHOT/";
-$a = "$ENV{PATH_INFO}" if "$ENV{PATH_INFO}";
+$artifact = "/$artifact/";
+$artifact =~ s,/+,/,g;
+$artifact =~ s,[^a-zA-Z.[0-9]-],,g;
+$artifact =~ s,../,,g;
-my $content = `wget -O - -q http://repository.apache.org/snapshots/org/apache/openejb/$a`;
+my $content = `wget -q -O - http://repository.apache.org/snapshots/org/apache/openejb$artifact`;
+
+my $ua = <<EOF;
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-2717626-1']);
+ _gaq.push(['_setDomainName', 'apache.org']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ </script>
+EOF
$content = join(" ", split("[ \r\n]+", $content));
$content =~ s/(<tr>)/\n$1/g;
@@ -16,5 +37,6 @@ $content =~ s,(</tr>),$1\n,g;
foreach my $line (split("\n", $content)) {
next if $line =~ /\.(sha1|md5|jar|pom|xml)|Parent/;
+ $line =~ s,</head>,$ua\n</head>,i;
print $line . "\n";
}
Propchange: openejb/site/trunk/cgi-bin/builds.cgi
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openejb/site/trunk/cgi-bin/builds.cgi
------------------------------------------------------------------------------
svn:executable = *