Return-Path: X-Original-To: apmail-buildr-commits-archive@www.apache.org Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D2019D95 for ; Sun, 23 Sep 2012 22:48:24 +0000 (UTC) Received: (qmail 73300 invoked by uid 500); 23 Sep 2012 22:48:24 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 73276 invoked by uid 500); 23 Sep 2012 22:48:24 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 73266 invoked by uid 99); 23 Sep 2012 22:48:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 22:48:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 22:48:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 15D402388900 for ; Sun, 23 Sep 2012 22:47:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1389157 - /buildr/trunk/rakelib/all-in-one.rake Date: Sun, 23 Sep 2012 22:47:39 -0000 To: commits@buildr.apache.org From: donaldp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120923224740.15D402388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: donaldp Date: Sun Sep 23 22:47:39 2012 New Revision: 1389157 URL: http://svn.apache.org/viewvc?rev=1389157&view=rev Log: Build the omibus install using the version of jruby we actually test against Modified: buildr/trunk/rakelib/all-in-one.rake Modified: buildr/trunk/rakelib/all-in-one.rake URL: http://svn.apache.org/viewvc/buildr/trunk/rakelib/all-in-one.rake?rev=1389157&r1=1389156&r2=1389157&view=diff ============================================================================== --- buildr/trunk/rakelib/all-in-one.rake (original) +++ buildr/trunk/rakelib/all-in-one.rake Sun Sep 23 22:47:39 2012 @@ -13,12 +13,16 @@ # License for the specific language governing permissions and limitations under # the License. +def workspace_dir + "#{File.expand_path(File.join(File.dirname(__FILE__), ".."))}" +end + desc "Create JRuby all-in-one distribution" task "all-in-one" => 'all-in-one:all-in-one' namespace :'all-in-one' do - version = "1.6.4" + version = "1.6.7" jruby_distro = "jruby-bin-#{version}.tar.gz" url = "http://jruby.org.s3.amazonaws.com/downloads/#{version}/#{jruby_distro}" dir = "jruby-#{version}" @@ -46,9 +50,15 @@ namespace :'all-in-one' do desc 'Download and extract JRuby' task :download_and_extract do - unless File.exist? jruby_distro + unless File.exist?(jruby_distro) puts "Downloading JRuby from #{url} ..." - sh 'wget', url + require 'open-uri' + File.open(jruby_distro, "wb") do |saved_file| + # the following "open" is provided by open-uri + open(url) do |read_file| + saved_file.write(read_file.read) + end + end puts "[X] Downloaded JRuby" end @@ -94,22 +104,27 @@ namespace :'all-in-one' do desc 'Add Buildr executables/scripts' task :add_execs do cp 'bin/jruby.exe', 'bin/_buildr.exe' - cp Dir["../../all-in-one/*"], 'bin' + cp "#{workspace_dir}/all-in-one/buildr", 'bin/buildr' + cp "#{workspace_dir}/all-in-one/_buildr", 'bin/_buildr' + cp "#{workspace_dir}/all-in-one/buildr.cmd", 'bin/buildr.cmd' + File.chmod(0500, 'bin/_buildr', 'bin/buildr') end desc 'Package distribution' task :package do + pkg_dir = "#{workspace_dir}/pkg" + mkpath pkg_dir puts "Zipping distribution ..." cd '..' new_dir = "#{spec.name}-all-in-one-#{spec.version}" mv dir, new_dir - zip = "#{new_dir}.zip" + zip = "#{pkg_dir}/#{new_dir}.zip" rm zip if File.exist? zip sh 'zip', '-q', '-r', zip, new_dir puts "[X] Zipped distribution" puts "Tarring distribution ..." - tar = "#{new_dir}.tar.gz" + tar = "#{pkg_dir}/#{new_dir}.tar.gz" rm tar if File.exist? tar sh 'tar', 'czf', tar, new_dir puts "[X] Tarred distribution"