You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/04/26 02:48:06 UTC

svn commit: r651753 - in /incubator/buildr/trunk: Rakefile doc/pages/download.textile rakelib/apache.rake

Author: assaf
Date: Fri Apr 25 17:48:04 2008
New Revision: 651753

URL: http://svn.apache.org/viewvc?rev=651753&view=rev
Log:
Code to generate links for binary/source downloads

Modified:
    incubator/buildr/trunk/Rakefile
    incubator/buildr/trunk/doc/pages/download.textile
    incubator/buildr/trunk/rakelib/apache.rake

Modified: incubator/buildr/trunk/Rakefile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/Rakefile?rev=651753&r1=651752&r2=651753&view=diff
==============================================================================
--- incubator/buildr/trunk/Rakefile (original)
+++ incubator/buildr/trunk/Rakefile Fri Apr 25 17:48:04 2008
@@ -79,6 +79,7 @@
 end
 
 
+ENV['incubating'] = 'true'
 ENV['staging'] = "people.apache.org:~/public_html/#{spec.name}/#{spec.version}"
 
 task 'apache:license'=>spec.files

Modified: incubator/buildr/trunk/doc/pages/download.textile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/download.textile?rev=651753&r1=651752&r2=651753&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/download.textile (original)
+++ incubator/buildr/trunk/doc/pages/download.textile Fri Apr 25 17:48:04 2008
@@ -13,11 +13,8 @@
 
 h2.  Binaries and Source Code
 
-At the moment we do not make offical Apache binary and source distributions.
-Unofficial binary and source distributions are available form
-"RubyForge":http://rubyforge.org/projects/buildr.
 
-p(note). When downloading from a mirror please check the
+p(note). When downloading from files please check the
 "md5sum":http://www.apache.org/dev/release-signing#md5 and verify the
 "OpenPGP":http://www.apache.org/dev/release-signing#openpgp compatible
 signature from the main Apache site. This

Modified: incubator/buildr/trunk/rakelib/apache.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/apache.rake?rev=651753&r1=651752&r2=651753&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/apache.rake (original)
+++ incubator/buildr/trunk/rakelib/apache.rake Fri Apr 25 17:48:04 2008
@@ -62,12 +62,34 @@
 
   # Publish prerequisites to distro server.
   task 'publish:distro' do |task, args|
-    target = args.incubating ? "people.apache.org:/www/www.apache.org/dist/incubator/#{spec.name}" :
-      "people.apache.org:/www/www.apache.org/dist/#{spec.name}"
-      "people.apache.org:/www/#{spec.name}.apache.org"
+    target = args.incubating ? "people.apache.org:/www/www.apache.org/dist/incubator/#{spec.name}/#{spec.version}-incubating" :
+      "people.apache.org:/www/www.apache.org/dist/#{spec.name}/#{spec.version}"
     puts 'Uploading packages to Apache distro ...'
     sh 'rsync', '--progress', 'published/distro/*', target
     puts 'Done'
+  end
+
+  task 'add-links' do |task, args|
+    url = args.incubating ? "http://www.apache.org/dist/incubator/#{spec.name}/#{spec.version}-incubating" :
+      "http://www.apache.org/dist/#{spec.name}/#{spec.version}"
+    links = FileList['staged/distro/*.{gem,tgz,zip}'].map { |pkg|
+      name = File.basename(pkg)
+      md5 = File.read("#{pkg}.md5").split.first
+      %{| "#{name}":#{url}/#{name} | "#{md5}":#{url}/#{name}.md5 | "PGP":#{url}/#{name}.asc |}
+    }
+    textile = <<-TEXTILE
+h3. #{spec.name} #{spec.version}-incubating
+
+|_. Package |_. MD5 Checksum |_. Signature |
+#{links.join("\n")}
+
+p>.  ("Signing keys":#{url}/KEYS)
+    TEXTILE
+    fn = 'doc/pages/download.textile'
+    modified = File.read(fn).sub(/^h2.*binaries.*source.*$/i) { |header| "#{header}\n\n#{textile}" }
+    File.open fn, 'w' do |file|
+      file.write modified
+    end
   end