albacore 2.0.14 → 2.0.15
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/versionizer.rb +1 -1
- data/lib/albacore/version.rb +1 -1
- data/spec/tasks/versionizer_spec.rb +15 -3
- 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: d652382ec8cc7fceda047d9d6fc256bb0b1320f4
|
4
|
+
data.tar.gz: a8d0f033e45efb7955f75a87f33cbb2145fd4ed3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e989a37a6b7689464fa9b7b8de221d3077a628dd471bcb4912b2d2533f0b274796ad0a7327e00d5a72341ba4bb9ceede9ce88f098f62f7b7f39f8f1a23178088
|
7
|
+
data.tar.gz: 884c905b0327ebfc8ab6db60a2ab5eb16cfd7eb6e4c6b41c16b4f816f93c62d2b354c8c368843cba48044e56f7fbfbe6dc13d53ad6d2254b658008b122c61288
|
@@ -58,7 +58,7 @@ module Albacore
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def self.format_nuget semver
|
61
|
-
if semver.prerelease
|
61
|
+
if semver.prerelease and not semver.prerelease.empty?
|
62
62
|
"#{semver.major}.#{semver.minor}.#{semver.patch}-#{semver.prerelease.gsub(/\W/, '')}"
|
63
63
|
else
|
64
64
|
semver.format '%M.%m.%p'
|
data/lib/albacore/version.rb
CHANGED
@@ -17,7 +17,7 @@ describe 'adding versionizer to a class' do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
describe 'finding build versions' do
|
20
|
+
describe 'finding build special versions' do
|
21
21
|
subject do
|
22
22
|
ver = XSemVer::SemVer.new(1, 2, 3, 'deadbeef')
|
23
23
|
::Albacore::Tasks::Versionizer.versions ver do
|
@@ -62,8 +62,6 @@ describe 'finding build versions' do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
|
67
65
|
describe 'finding build versions' do
|
68
66
|
subject do
|
69
67
|
ver = XSemVer::SemVer.new(1, 2, 3, 'alpha.1-wasabi')
|
@@ -81,3 +79,17 @@ describe 'finding build versions' do
|
|
81
79
|
expect(subject[:nuget_version]).to eq '1.2.3-alpha1wasabi'
|
82
80
|
end
|
83
81
|
end
|
82
|
+
|
83
|
+
describe 'finding build special versions' do
|
84
|
+
subject do
|
85
|
+
ver = XSemVer::SemVer.new(1, 2, 3)
|
86
|
+
::Albacore::Tasks::Versionizer.versions ver do
|
87
|
+
['123456', '2014-02-27 16:55:55']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'should not return the proper semver 2.0 format' do
|
92
|
+
# nuget doesn't support semver 2.0
|
93
|
+
expect(subject[:nuget_version]).to eq '1.2.3'
|
94
|
+
end
|
95
|
+
end
|