fastlane-plugin-better_semantic_release 2.0.10 → 2.0.12

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
  SHA256:
3
- metadata.gz: de491d690f759ee47eae0ae508c236eaf519c6e58a965007080789582af273fd
4
- data.tar.gz: 22663fc26a454d407e8369a8f21ca7639f70fed295e6ae6629b4d815ecc57026
3
+ metadata.gz: 142599a4d25ff2dd47428c8de7684bba89a392e0f2e6786c8195cb9956f3c21f
4
+ data.tar.gz: c9151dee2b0fd22d54e35def74031e9a70e658c2958daa6985ef3d333f8669ea
5
5
  SHA512:
6
- metadata.gz: 329a5678abd24454d9f8794d9151a653b68525307f0e8cac2e2e9490f78502ea75840b2caaf1543d11092a3b2c8e6ac0095d2fcd9a36cab1f0f543578c7033f9
7
- data.tar.gz: b98b692de65a55fbe3e0fbf33ad0dba3138a37192c5676b0bed3b0b3ca8770e9f6a3c0ed38e91030491e10b9666cd6090aa3b4bbc13ad05f5f26596408db7ffc
6
+ metadata.gz: 03ba6831f38b10712fb28f1b412c2742e9ff194f196ec178b847b50066b97979a88f8dfbf8fd5180290af5e36a0bb6f97f30816817c0b8626484de9984c33903
7
+ data.tar.gz: c25bc5f97209c6a9a52c6ccd33e85dbe1507db458e23a358db315d521f11a47c8da26b620b1bd853af54533c1fd65144b17db6296ec30f005e2de8388c8e53a5
data/README.md CHANGED
@@ -85,6 +85,13 @@ And you can access these like this:
85
85
 
86
86
  To run the test suite (contained in `./spec`), call `bundle exec rake`
87
87
 
88
+ # Publishing Update
89
+
90
+ Increment version number and run:
91
+
92
+ `bundle install && rake install && rake release`
93
+
94
+
88
95
  ## Questions
89
96
 
90
97
  If you need anything ping us on [twitter](http://bit.ly/t-xotahal).
@@ -135,7 +135,10 @@ module Fastlane
135
135
  format_pattern = lane_context[SharedValues::CONVENTIONAL_CHANGELOG_ACTION_FORMAT_PATTERN]
136
136
  splitted.each do |squashed_commit|
137
137
  commits = squashed_commit.split("*")
138
- commits.drop(1).each do |line|
138
+ # This works for Bitbucket
139
+ #commits.drop(1).each do |line|
140
+ # This works for Gitlab
141
+ commits.each do |line|
139
142
  parts = line.split(":")
140
143
  if parts.length > 1
141
144
  # conventional commits are in format
@@ -178,29 +178,66 @@ module Fastlane
178
178
  format_pattern = lane_context[SharedValues::CONVENTIONAL_CHANGELOG_ACTION_FORMAT_PATTERN]
179
179
  squashed_commits.each do |squashed_commit|
180
180
  commits = squashed_commit.split("*")
181
- commits.drop(1).each do |line|
181
+ # This works for Bitbucket
182
+ #commits.drop(1).each do |line|
183
+ # This works for Gitlab
184
+ commits.each do |line|
182
185
  splitted = line.split("|")
183
186
 
184
- commit = Helper::BetterSemanticReleaseHelper.parse_commit(
185
- commit_subject: splitted[0],
186
- commit_body: splitted[1],
187
- pattern: format_pattern
188
- )
189
-
190
- unless commit[:scope].nil?
191
- # if this commit has a scope, then we need to inspect to see if that is one of the scopes we're trying to exclude
192
- scope = commit[:scope]
193
- scopes_to_ignore = params[:ignore_scopes]
194
- # if it is, we'll skip this commit when bumping versions
195
- next if scopes_to_ignore.include?(scope) #=> true
187
+ # This is a regular commit
188
+ # every `line` in commits array has it's own hash and other info
189
+ if splitted.length() > 1
190
+ commit = Helper::BetterSemanticReleaseHelper.parse_commit(
191
+ commit_subject: splitted[0],
192
+ commit_body: splitted[1],
193
+ pattern: format_pattern
194
+ )
195
+
196
+ unless commit[:scope].nil?
197
+ # if this commit has a scope, then we need to inspect to see if that is one of the scopes we're trying to exclude
198
+ scope = commit[:scope]
199
+ scopes_to_ignore = params[:ignore_scopes]
200
+ # if it is, we'll skip this commit when bumping versions
201
+ next if scopes_to_ignore.include?(scope) #=> true
202
+ end
203
+
204
+ commit[:hash] = splitted[2]
205
+ commit[:short_hash] = splitted[3]
206
+ commit[:author_name] = splitted[4]
207
+ commit[:commit_date] = splitted[5]
208
+ parsed.push(commit)
209
+
210
+ # This is a rebased-squash commit
211
+ # Every line is one commit message but hash and other details
212
+ # are on the very last `line` in the commits array.
213
+ elsif
214
+ # Skip any empty space
215
+ unless line.to_s.strip.empty?
216
+ # Split last commit since that's the squashed commit that has the extra details on it for all these commits
217
+ splitted = commits[commits.length() -1]
218
+
219
+ commit = Helper::BetterSemanticReleaseHelper.parse_commit(
220
+ commit_subject: line.to_s.strip,
221
+ commit_body: "",
222
+ pattern: format_pattern
223
+ )
224
+
225
+ unless commit[:scope].nil?
226
+ # if this commit has a scope, then we need to inspect to see if that is one of the scopes we're trying to exclude
227
+ scope = commit[:scope]
228
+ scopes_to_ignore = params[:ignore_scopes]
229
+ # if it is, we'll skip this commit when bumping versions
230
+ next if scopes_to_ignore.include?(scope) #=> true
231
+ end
232
+
233
+ commit[:hash] = splitted[2]
234
+ commit[:short_hash] = splitted[3]
235
+ commit[:author_name] = splitted[4]
236
+ commit[:commit_date] = splitted[5]
237
+
238
+ parsed.push(commit)
239
+ end
196
240
  end
197
-
198
- commit[:hash] = splitted[2]
199
- commit[:short_hash] = splitted[3]
200
- commit[:author_name] = splitted[4]
201
- commit[:commit_date] = splitted[5]
202
-
203
- parsed.push(commit)
204
241
  end
205
242
  end
206
243
 
@@ -21,7 +21,15 @@ module Fastlane
21
21
  end
22
22
 
23
23
  def self.parse_commit(params)
24
- commit_subject = params[:commit_subject].strip
24
+ #UI.message "-------------"
25
+ #begin
26
+ # UI.message "body: " + params[:commit_body]
27
+ #rescue
28
+ # UI.message "ERROR_HERE: "
29
+ # UI.message params
30
+ #end
31
+ #UI.message "subject: " + params[:commit_subject].delete("\n")
32
+ commit_subject = params[:commit_subject].delete("\n")
25
33
  commit_body = params[:commit_body]
26
34
  releases = params[:releases]
27
35
  codepush_friendly = params[:codepush_friendly]
@@ -58,7 +66,8 @@ module Fastlane
58
66
  unless commit_body.nil?
59
67
  breaking_change_matched = commit_body.match(breaking_change_pattern)
60
68
  codepush_matched = commit_body.match(codepush_pattern)
61
-
69
+
70
+ #UI.message commit_body
62
71
  unless breaking_change_matched.nil?
63
72
  result[:is_breaking_change] = true
64
73
  result[:breaking_change] = breaking_change_matched[1]
@@ -69,6 +78,9 @@ module Fastlane
69
78
  end
70
79
  end
71
80
 
81
+
82
+ #UI.message result
83
+
72
84
  result
73
85
  end
74
86
 
@@ -1 +1 @@
1
- module Fastlane module BetterSemanticRelease VERSION = "2.0.10" end end
1
+ module Fastlane module BetterSemanticRelease VERSION = "2.0.12" end end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-better_semantic_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Greco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2023-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry