albacore 2.2.0.pre.beta → 2.2.0.pre.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/albacore/tasks/release.rb +15 -3
- data/lib/albacore/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afdf82521259be8d8e28a28d488bbc26de3c12ea
|
4
|
+
data.tar.gz: 0c2082e1d5589ac64694b39451deda54b39866af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc2b8cb3bc2be5b318c40284130503e129608ba18c0ac9dae8cfe7ce12edd3211dc45de63cbc44ffb6e7f3abe2757bb25e60587ab003a78c487d8695b900ba4
|
7
|
+
data.tar.gz: cbf4923cea658e42c5f54de8af2c3735d8cd44af546d569e8ae73f4bc97c8b75cbe7af6e22ab60afc69065a3c9c228646385298741eb4bed91022b6b08be1e06
|
@@ -60,17 +60,19 @@ module Albacore
|
|
60
60
|
#
|
61
61
|
def install
|
62
62
|
namespace :release do
|
63
|
-
desc 'ensure the tree is not dirty'
|
64
63
|
task :guard_clean => @opts.get(:depend_on) do
|
65
64
|
guard_clean
|
66
65
|
end
|
67
66
|
|
67
|
+
task :guard_pkg => @opts.get(:depend_on) do
|
68
|
+
guard_pkg
|
69
|
+
end
|
70
|
+
|
68
71
|
task :scm_write => @opts.get(:depend_on) do
|
69
72
|
tag_version { git_push } unless already_tagged?
|
70
73
|
end
|
71
74
|
|
72
75
|
task :nuget_push => @opts.get(:depend_on) do
|
73
|
-
packages = Dir.glob "#{@opts.get :pkg_dir}/*.#{@semver.format "%M.%m.%p"}.nupkg"
|
74
76
|
packages.each do |package|
|
75
77
|
nuget_push package
|
76
78
|
end
|
@@ -78,7 +80,7 @@ module Albacore
|
|
78
80
|
end
|
79
81
|
|
80
82
|
desc 'release current package(s)'
|
81
|
-
task @name => [:'release:guard_clean', :'release:scm_write', :'release:nuget_push']
|
83
|
+
task @name => [:'release:guard_clean', :'release:guard_pkg', :'release:scm_write', :'release:nuget_push']
|
82
84
|
end
|
83
85
|
|
84
86
|
protected
|
@@ -120,6 +122,10 @@ module Albacore
|
|
120
122
|
clean? && committed? or raise("There are files that need to be committed first.")
|
121
123
|
end
|
122
124
|
|
125
|
+
def guard_pkg
|
126
|
+
(! packages.empty?) or raise('You must have built your packages, use "depend_on: :nuget_pkg"')
|
127
|
+
end
|
128
|
+
|
123
129
|
def clean?
|
124
130
|
run('git diff --exit-code', silent: true)[1] == 0
|
125
131
|
end
|
@@ -142,6 +148,12 @@ module Albacore
|
|
142
148
|
@semver.to_s
|
143
149
|
end
|
144
150
|
|
151
|
+
def packages
|
152
|
+
# only read packages once
|
153
|
+
@packages ||= Dir.glob "#{@opts.get :pkg_dir}/*.#{@semver.format "%M.%m.%p"}.nupkg"
|
154
|
+
@packages
|
155
|
+
end
|
156
|
+
|
145
157
|
def gem_push?
|
146
158
|
! %w{n no nil false off 0}.include?(ENV['gem_push'].to_s.downcase)
|
147
159
|
end
|
data/lib/albacore/version.rb
CHANGED