fastlane-plugin-semantic_release 1.14.1 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb +26 -12
- data/lib/fastlane/plugin/semantic_release/actions/conventional_changelog.rb +12 -7
- data/lib/fastlane/plugin/semantic_release/helper/semantic_release_helper.rb +14 -0
- data/lib/fastlane/plugin/semantic_release/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfdd6b224d265922b3de9f42697de102ceacca38c4222e21295ace3e695c204c
|
4
|
+
data.tar.gz: cd348da86de7b4eba45d92672b67f6ce2af63ddd441b0a6d187296c9c9a5f8e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f91ea3be74683aeca782926fd80ca13e6f43ba1a6814cc89f76c055cc3e0b57183f885fc47ee97bfaac6cd8592cb02d0c1298ed57885ca4464801b5e8bbdcb6
|
7
|
+
data.tar.gz: e7d77b750b04093063de46eb83ba151b4a600e990c8e3e14bf97e5c0e548262f0a515b3b348a643de6fdf6877198889a2a0947947079579cf80233cfa19bc2fe
|
@@ -43,7 +43,7 @@ module Fastlane
|
|
43
43
|
|
44
44
|
def self.get_beginning_of_next_sprint(params)
|
45
45
|
# command to get first commit
|
46
|
-
git_command =
|
46
|
+
git_command = "git rev-list --max-parents=0 HEAD"
|
47
47
|
|
48
48
|
tag = get_last_tag(match: params[:match], debug: params[:debug])
|
49
49
|
|
@@ -61,9 +61,11 @@ module Fastlane
|
|
61
61
|
}
|
62
62
|
end
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
unless params[:prevent_tag_fallback]
|
65
|
+
# neither matched tag and first hash could be used - as fallback we try vX.Y.Z
|
66
|
+
UI.message("It couldn't match tag for #{params[:match]} and couldn't use first commit. Check if tag vX.Y.Z can be taken as a begining of next release")
|
67
|
+
tag = get_last_tag(match: "v*", debug: params[:debug])
|
68
|
+
end
|
67
69
|
|
68
70
|
# even fallback tag doesn't work
|
69
71
|
if tag.empty?
|
@@ -140,13 +142,11 @@ module Fastlane
|
|
140
142
|
pattern: format_pattern
|
141
143
|
)
|
142
144
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
next if scopes_to_ignore.include?(scope) #=> true
|
149
|
-
end
|
145
|
+
next if Helper::SemanticReleaseHelper.should_exclude_commit(
|
146
|
+
commit_scope: commit[:scope],
|
147
|
+
include_scopes: params[:include_scopes],
|
148
|
+
ignore_scopes: params[:ignore_scopes]
|
149
|
+
)
|
150
150
|
|
151
151
|
if commit[:release] == "major" || commit[:is_breaking_change]
|
152
152
|
next_major += 1
|
@@ -190,7 +190,7 @@ module Fastlane
|
|
190
190
|
end
|
191
191
|
|
192
192
|
def self.is_codepush_friendly(params)
|
193
|
-
git_command =
|
193
|
+
git_command = "git rev-list --max-parents=0 HEAD"
|
194
194
|
# Begining of the branch is taken for codepush analysis
|
195
195
|
hash_lines = Actions.sh("#{git_command} | wc -l", log: params[:debug]).chomp
|
196
196
|
hash = Actions.sh(git_command, log: params[:debug]).chomp
|
@@ -315,6 +315,20 @@ module Fastlane
|
|
315
315
|
description: "To parse version number from tag name",
|
316
316
|
default_value: '\d+\.\d+\.\d+'
|
317
317
|
),
|
318
|
+
FastlaneCore::ConfigItem.new(
|
319
|
+
key: :prevent_tag_fallback,
|
320
|
+
description: "Prevent tag from falling back to vX.Y.Z when there is no match",
|
321
|
+
default_value: false,
|
322
|
+
type: Boolean,
|
323
|
+
optional: true
|
324
|
+
),
|
325
|
+
FastlaneCore::ConfigItem.new(
|
326
|
+
key: :include_scopes,
|
327
|
+
description: "To only include certain scopes when calculating releases",
|
328
|
+
default_value: [],
|
329
|
+
type: Array,
|
330
|
+
optional: true
|
331
|
+
),
|
318
332
|
FastlaneCore::ConfigItem.new(
|
319
333
|
key: :ignore_scopes,
|
320
334
|
description: "To ignore certain scopes when calculating releases",
|
@@ -185,13 +185,11 @@ module Fastlane
|
|
185
185
|
pattern: format_pattern
|
186
186
|
)
|
187
187
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
next if scopes_to_ignore.include?(scope) #=> true
|
194
|
-
end
|
188
|
+
next if Helper::SemanticReleaseHelper.should_exclude_commit(
|
189
|
+
commit_scope: commit[:scope],
|
190
|
+
include_scopes: params[:include_scopes],
|
191
|
+
ignore_scopes: params[:ignore_scopes]
|
192
|
+
)
|
195
193
|
|
196
194
|
commit[:hash] = splitted[2]
|
197
195
|
commit[:short_hash] = splitted[3]
|
@@ -281,6 +279,13 @@ module Fastlane
|
|
281
279
|
type: Boolean,
|
282
280
|
optional: true
|
283
281
|
),
|
282
|
+
FastlaneCore::ConfigItem.new(
|
283
|
+
key: :include_scopes,
|
284
|
+
description: "To only include certain scopes when calculating releases",
|
285
|
+
default_value: [],
|
286
|
+
type: Array,
|
287
|
+
optional: true
|
288
|
+
),
|
284
289
|
FastlaneCore::ConfigItem.new(
|
285
290
|
key: :ignore_scopes,
|
286
291
|
description: "To ignore certain scopes when calculating releases",
|
@@ -20,6 +20,20 @@ module Fastlane
|
|
20
20
|
Actions.sh(command, log: params[:debug]).chomp
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.should_exclude_commit(params)
|
24
|
+
commit_scope = params[:commit_scope]
|
25
|
+
scopes_to_include = params[:include_scopes]
|
26
|
+
scopes_to_ignore = params[:ignore_scopes]
|
27
|
+
|
28
|
+
unless scopes_to_include.empty?
|
29
|
+
return !scopes_to_include.include?(commit_scope)
|
30
|
+
end
|
31
|
+
|
32
|
+
unless commit_scope.nil?
|
33
|
+
return scopes_to_ignore.include?(commit_scope)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
23
37
|
def self.parse_commit(params)
|
24
38
|
commit_subject = params[:commit_subject].strip
|
25
39
|
commit_body = params[:commit_body]
|
@@ -1 +1 @@
|
|
1
|
-
module Fastlane module SemanticRelease VERSION = "1.
|
1
|
+
module Fastlane module SemanticRelease VERSION = "1.18.0" end end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-semantic_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jiří Otáhal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|