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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e854836b52f89c28e1f486c0d9f89042ecb15a4
4
- data.tar.gz: cf2d48cf0215692536f625e87c6edb729e5a243e
3
+ metadata.gz: afdf82521259be8d8e28a28d488bbc26de3c12ea
4
+ data.tar.gz: 0c2082e1d5589ac64694b39451deda54b39866af
5
5
  SHA512:
6
- metadata.gz: 11da68eb2c56c77891f892b369e82866c0ffc0f089977e9841336d894a05d995cdaafdcc3b7b10e379d1d6250f7e60a8eb5b79245e644586ebd4f27774597e23
7
- data.tar.gz: 85b35c45c35a650bdb00a294993232940c1a5f34235757358abb4d1529d42ec804eb49a237595d9296529ebd24f416d64abecb3ed04b77155817d0fb66aea3a1
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
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.2.0-beta"
2
+ VERSION = "2.2.0-beta.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: albacore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0.pre.beta
4
+ version: 2.2.0.pre.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Feldt