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 +4 -0
- data/lib/buildr.rb +1 -1
- data/lib/core/artifact.rb +19 -21
- data/lib/core/build.rb +0 -1
- data/lib/java/packaging.rb +1 -1
- metadata +1 -1
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.
|
data/lib/buildr.rb
CHANGED
data/lib/core/artifact.rb
CHANGED
@@ -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
|
-
#
|
356
|
-
#
|
357
|
-
#
|
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
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
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
|
data/lib/core/build.rb
CHANGED
data/lib/java/packaging.rb
CHANGED