albacore 3.0.0.pre.alpha → 3.0.0.pre.alpha.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/nuget_model.rb +9 -2
- data/lib/albacore/task_types/nugets_pack.rb +8 -0
- data/lib/albacore/tools.rb +10 -3
- data/lib/albacore/version.rb +1 -1
- data/spec/tools_spec.rb +2 -2
- 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: 0d8d6861b98e42667d38dd2c30470958387f481e
|
4
|
+
data.tar.gz: 5b40c5f5645dc93216bcd7951829878a8e9bbd22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67cad4c15fdbe1a8d3ff78284b8818756423e9fedb2f02383f25f3d0c1e1dbfeb810f0fcb863df200d5324e7e0e83a9fecb72a83d6165a3fc0e9d03469416595
|
7
|
+
data.tar.gz: 973aa00d6ed341eccc5875cefb7819c625071bcf84233b0e5dc28b029fdb738d265819fef6093ee23dd382d779d029df1a895a80191d7570a5316ae4deb9aba0
|
data/lib/albacore/nuget_model.rb
CHANGED
@@ -150,7 +150,15 @@ end})
|
|
150
150
|
|
151
151
|
# fields
|
152
152
|
@set_fields.each do |f|
|
153
|
-
|
153
|
+
key, value = Metadata.pascal_case(f), send(f)
|
154
|
+
if value.include?("\n")
|
155
|
+
lines << "#{key}"
|
156
|
+
value.split(/\r\n|\n/).map{ |line| " #{line}"}.each do |line|
|
157
|
+
lines << line
|
158
|
+
end
|
159
|
+
else
|
160
|
+
lines << "#{key} #{value}"
|
161
|
+
end
|
154
162
|
end
|
155
163
|
|
156
164
|
lines << 'dependencies' unless @dependencies.empty?
|
@@ -476,7 +484,6 @@ end})
|
|
476
484
|
package.metadata.title = proj.name if proj.name
|
477
485
|
package.metadata.version = version if version
|
478
486
|
package.metadata.authors = proj.authors if proj.authors
|
479
|
-
package.metadata.release_notes = Albacore::Tools.git_release_notes
|
480
487
|
|
481
488
|
if opts.get :nuget_dependencies
|
482
489
|
trace "adding nuget dependencies for id #{proj.id} [nuget model: package]"
|
@@ -65,6 +65,13 @@ module Albacore
|
|
65
65
|
raise '"version" is a required property'
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
def fallbacks!
|
70
|
+
if @metadata.release_notes.nil?
|
71
|
+
notes = Albacore::Tools.git_release_notes
|
72
|
+
@metadata.release_notes = notes
|
73
|
+
end
|
74
|
+
end
|
68
75
|
end
|
69
76
|
|
70
77
|
class Cmd
|
@@ -77,6 +84,7 @@ module Albacore
|
|
77
84
|
|
78
85
|
def execute
|
79
86
|
@config.validate
|
87
|
+
@config.fallbacks!
|
80
88
|
invocations(@config).each do |parameters|
|
81
89
|
system @executable, parameters, clr_command: true
|
82
90
|
end
|
data/lib/albacore/tools.rb
CHANGED
@@ -12,8 +12,15 @@ module Albacore::Tools
|
|
12
12
|
last_tag = tags[-1]
|
13
13
|
# second_last_tag = tags[-2] || `git rev-list --max-parents=0 HEAD`
|
14
14
|
# logs = `git log --pretty=format:%s #{second_last_tag}..`.split(/\n/)
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
|
16
|
+
logs = []
|
17
|
+
logs << '## Release notes'
|
18
|
+
`git log --pretty=format:%s #{last_tag}..`
|
19
|
+
.encode!('UTF-8')
|
20
|
+
.split(/\n/)
|
21
|
+
.each do |logline|
|
22
|
+
logs << " * #{logline}"
|
23
|
+
end
|
24
|
+
logs
|
18
25
|
end
|
19
26
|
end
|
data/lib/albacore/version.rb
CHANGED
data/spec/tools_spec.rb
CHANGED
@@ -4,8 +4,8 @@ describe 'when calling Tools#git_release_notes' do
|
|
4
4
|
subject do
|
5
5
|
Albacore::Tools.git_release_notes
|
6
6
|
end
|
7
|
-
it 'should start with "Release
|
8
|
-
expect(subject).to match /Release
|
7
|
+
it 'should start with "Release notes"...' do
|
8
|
+
expect(subject).to match /Release notes/
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|