buildr 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.15 (2/28/2007)
2
+ * Fixed: tasks fail unless deployment server specified.
3
+ * Changed: deploy method executes deployment, instead of returning a task.
4
+
1
5
  0.14 (2/28/2007)
2
6
  * Added: check task that looks for obvious errors in the Rakefile.
3
7
  * Added: deploy task for managing deployment.
@@ -7,7 +7,7 @@ gem "rubyzip"
7
7
  gem "highline"
8
8
 
9
9
  module Buildr
10
- VERSION = "0.14.0"
10
+ VERSION = "0.15.0"
11
11
  end
12
12
 
13
13
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__))
@@ -352,9 +352,9 @@ module Buildr
352
352
  args.flatten.map { |id| artifact :group=>hash[:under], :version=>hash[:version], :id=>id }
353
353
  end
354
354
 
355
- # Creates and return a task that will deploy all the specified
356
- # artifacts and files. Specify the deployment server by passing it
357
- # as the last argument (must be a hash).
355
+ # Deploys all the specified artifacts/files. Specify the deployment
356
+ # server by passing a hash as the last argument, or have it use
357
+ # repositories.deploy_to.
358
358
  #
359
359
  # For example:
360
360
  # deploy(*process.packages, :url=>"sftp://example.com/var/www/maven")
@@ -368,24 +368,22 @@ module Buildr
368
368
  end
369
369
  url = options[:url]
370
370
  options = options.reject { |k,v| k === :url }
371
- fail "Don't know where to release, specify a URL or use repositories.deploy_to = url|hash" if url.blank?
372
-
373
- # Arguments are artifacts and types so we depend on them.
374
- task(url=>args).enhance do |task|
375
- Transports.perform url, options do |session|
376
- args.each do |artifact|
377
- if artifact.respond_to?(:to_spec)
378
- # Upload artifact relative to base URL, need to create path before uploading.
379
- puts "Deploying #{artifact.to_spec}" if verbose
380
- spec = artifact.to_spec_hash
381
- path = spec[:group].gsub(".", "/") + "/#{spec[:id]}/#{spec[:version]}/"
382
- session.mkpath path
383
- session.upload artifact.to_s, path + Artifact.hash_to_file_name(spec)
384
- else
385
- # Upload artifact to URL.
386
- puts "Deploying #{artifact}" if verbose
387
- session.upload artifact, File.basename(artifact)
388
- end
371
+ fail "Don't know where to deploy, perhaps you forgot to set repositories.deploy_to" if url.blank?
372
+
373
+ args.each { |arg| arg.invoke if arg.respond_to?(:invoke) }
374
+ Transports.perform url, options do |session|
375
+ args.each do |artifact|
376
+ if artifact.respond_to?(:to_spec)
377
+ # Upload artifact relative to base URL, need to create path before uploading.
378
+ puts "Deploying #{artifact.to_spec}" if verbose
379
+ spec = artifact.to_spec_hash
380
+ path = spec[:group].gsub(".", "/") + "/#{spec[:id]}/#{spec[:version]}/"
381
+ session.mkpath path
382
+ session.upload artifact.to_s, path + Artifact.hash_to_file_name(spec)
383
+ else
384
+ # Upload artifact to URL.
385
+ puts "Deploying #{artifact}" if verbose
386
+ session.upload artifact, File.basename(artifact)
389
387
  end
390
388
  end
391
389
  end
@@ -66,7 +66,6 @@ module Buildr
66
66
  end
67
67
 
68
68
  def svn(*args)
69
- #args << { :verbose=>Rake.application.options.trace }
70
69
  stdin, stdout, stderr = Open3.popen3("svn", *args)
71
70
  stdin.close
72
71
  error = stderr.read
@@ -138,7 +138,7 @@ module Buildr
138
138
  end
139
139
  end
140
140
 
141
- task "deploy"=>deploy(package, package.pom)
141
+ task("deploy") { deploy(package, package.pom) }
142
142
 
143
143
  packages << package
144
144
  Artifact.register package
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: buildr
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.14.0
6
+ version: 0.15.0
7
7
  date: 2007-02-28 00:00:00 -08:00
8
8
  summary: A build system that doesn't suck
9
9
  require_paths: