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 2009/03/13 04:00:47 UTC
svn commit: r753098 - in /buildr/trunk: CHANGELOG lib/buildr/core/build.rb
lib/buildr/core/util.rb spec/core/build_spec.rb
Author: assaf
Date: Fri Mar 13 03:00:45 2009
New Revision: 753098
URL: http://svn.apache.org/viewvc?rev=753098&view=rev
Log:
Fixed: BUILDR-230 release task fails if there's a space in the path to the Buildfile.
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/core/build.rb
buildr/trunk/lib/buildr/core/util.rb
buildr/trunk/spec/core/build_spec.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=753098&r1=753097&r2=753098&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Mar 13 03:00:45 2009
@@ -47,6 +47,8 @@
META-INF/MANIFEST.MF (Joel Muzzerall).
* Fixed: BUILDR-226 Release task should use XML output of "svn info" instead
of human-readable output (Alexis Midon).
+* Fixed: BUILDR-230 release task fails if there's a space in the path to the
+Buildfile.
* Fixed: BUILDR-235 JRuby download link is broke (Alexis Midon).
* Fixed: BUILDR-239 HTTP redirects lose authentication information (Joel
Muzzerall).
Modified: buildr/trunk/lib/buildr/core/build.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/build.rb?rev=753098&r1=753097&r2=753098&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/build.rb (original)
+++ buildr/trunk/lib/buildr/core/build.rb Fri Mar 13 03:00:45 2009
@@ -267,10 +267,11 @@
# Make a release.
def make
check
- with_release_candidate_version do |release_candidate_buildfile|
- options = ['--buildfile', release_candidate_buildfile, 'DEBUG=no']
- options << '--environment' << Buildr.environment unless Buildr.environment.to_s.empty?
- buildr %w{clean upload}, options
+ with_release_candidate_version do |release_candidate_buildfile|
+ args = '-S', 'buildr', "_#{Buildr::VERSION}_", '--buildfile', release_candidate_buildfile
+ args << '--environment' << Buildr.environment unless Buildr.environment.to_s.empty?
+ args << 'clean' << 'upload' << 'DEBUG=no'
+ ruby *args
end
tag_release resolve_tag
update_version_to_next
@@ -289,18 +290,7 @@
end
protected
- # :call-seq:
- # buildr(tasks, options)
- #
- # Calls another instance of buildr.
- def buildr(tasks, options)
- sh "#{command} _#{Buildr::VERSION}_ #{tasks.join(' ')} #{options.join(' ')}"
- end
- def command #:nodoc:
- Config::CONFIG['arch'] =~ /dos|win32/i ? $PROGRAM_NAME.ext('cmd') : $PROGRAM_NAME
- end
-
# :call-seq:
# with_release_candidate_version() { |filename| ... }
#
Modified: buildr/trunk/lib/buildr/core/util.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/util.rb?rev=753098&r1=753097&r2=753098&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/util.rb (original)
+++ buildr/trunk/lib/buildr/core/util.rb Fri Mar 13 03:00:45 2009
@@ -60,8 +60,10 @@
end
cmd << ruby_bin
cmd << '-S' << options.delete(:command) if options[:command]
- sh *cmd.push(*args.flatten).push(options) do |ok, status|
- ok or fail "Command failed with status (#{status ? status.exitstatus : 'unknown'}): [#{cmd.join(" ")}]"
+ cmd.concat args.flatten
+ cmd.push options
+ sh *cmd do |ok, status|
+ ok or fail "Command ruby failed with status (#{status ? status.exitstatus : 'unknown'}): [#{cmd.join(" ")}]"
end
end
Modified: buildr/trunk/spec/core/build_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/build_spec.rb?rev=753098&r1=753097&r2=753098&view=diff
==============================================================================
--- buildr/trunk/spec/core/build_spec.rb (original)
+++ buildr/trunk/spec/core/build_spec.rb Fri Mar 13 03:00:45 2009
@@ -327,7 +327,7 @@
end # of Buildr::Svn
-describe 'a release process', :shared=>true do
+describe 'a release process', :shared=>true do
describe '#make' do
before do
@@ -335,6 +335,8 @@
# Prevent a real call to a spawned buildr process.
@release.stub!(:buildr)
@release.stub!(:check)
+ @release.should_receive(:ruby).with('-S', 'buildr', "_#{Buildr::VERSION}_", '--buildfile', File.expand_path('buildfile.next'),
+ '--environment', 'development', 'clean', 'upload', 'DEBUG=no')
end
it 'should tag a release with the release version' do