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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9dfa11c2bc3112b05ccea24961efa85bba34debd
4
- data.tar.gz: a7cfcaa1dab72c5136ff7f41b08b08f638b34827
3
+ metadata.gz: 0d8d6861b98e42667d38dd2c30470958387f481e
4
+ data.tar.gz: 5b40c5f5645dc93216bcd7951829878a8e9bbd22
5
5
  SHA512:
6
- metadata.gz: b9052b233fb098ac1d6a5abc9b1085525fe700c882633fadb67ab2d215185b315c78c3b6f3447ab396b5bcb4731ccac2ac223e4af2e99131796c2e5303a02d86
7
- data.tar.gz: 2e9efe5a7afac83b40d7526ae640046853bab62757654eb8ef89ffcbedafabac1c0d186b27d8aab1c1911b295869822256892e76696c7f040c73fe9ed8bb40a5
6
+ metadata.gz: 67cad4c15fdbe1a8d3ff78284b8818756423e9fedb2f02383f25f3d0c1e1dbfeb810f0fcb863df200d5324e7e0e83a9fecb72a83d6165a3fc0e9d03469416595
7
+ data.tar.gz: 973aa00d6ed341eccc5875cefb7819c625071bcf84233b0e5dc28b029fdb738d265819fef6093ee23dd382d779d029df1a895a80191d7570a5316ae4deb9aba0
@@ -150,7 +150,15 @@ end})
150
150
 
151
151
  # fields
152
152
  @set_fields.each do |f|
153
- lines << "#{Metadata.pascal_case(f)} #{send(f)}"
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
@@ -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
- logs = `git log --pretty=format:%s #{last_tag}..`.encode!('UTF-8').split(/\n/)
16
- "Release Notes:
17
- #{logs.inject('') { |state, line| state + "\n * #{line}" }}"
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
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "3.0.0-alpha"
2
+ VERSION = "3.0.0-alpha.2"
3
3
  end
@@ -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 Notes"...' do
8
- expect(subject).to match /Release Notes/
7
+ it 'should start with "Release notes"...' do
8
+ expect(subject).to match /Release notes/
9
9
  end
10
10
  end
11
11
 
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: 3.0.0.pre.alpha
4
+ version: 3.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Feldt