fastlane-plugin-semantic_release 1.19.0 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5fd2091977076fa7c3cd554b92454fa7cf583874576000df9780a7a83fccd73
4
- data.tar.gz: a45639adf9085e141016577d4b7868c50f9a65e4bfad00e0e6a0cf2d58f2b83f
3
+ metadata.gz: 28a273aa51b74e1a6013f2dd035a6db0d83cabec6f3f07c3bd59c92f426d2f67
4
+ data.tar.gz: 5c7e9fc6c6bbb295b1689334c94f2e41ac0010ab53292516380b41fae3a9fc40
5
5
  SHA512:
6
- metadata.gz: 9d72ae2018651641f4782646562b917e61e598ed6bf719a143fd80b7bf2b287b8b3bb7a26955daa27986026c7e6fc3949c2f4177b15cf3f9c8477a72e044a9ec
7
- data.tar.gz: c12505a719b59038a7724105f4384cf226dbd8745f8dabfa132d3aead69a60e4a3ecd98a84066a5cb4791cc91f887a5bb9cb8e78ac45048b37df5c0dc85081e3
6
+ metadata.gz: 1ad7a7cc60d18602ae2bf76923fe1ab4a44435be39b4ba9db8845e47c7f7a10cb072104cbf5fda822268bd555bb75d9f0d09353b3dfded009bf7a92029f3b4d7
7
+ data.tar.gz: a6be6f39ded93ba158942e5e301c17b0c9873995be2f0ad0f69e0fd7e980e07212972fa86c33c0f1ca42328c1f751a5dbe1ba98cbbc4485a56b656a95e9880aa
@@ -51,26 +51,11 @@ module Fastlane
51
51
  if tag.empty?
52
52
  UI.message("It couldn't match tag for #{params[:match]}. Check if first commit can be taken as a beginning of next release")
53
53
  # If there is no tag found we taking the first commit of current branch
54
- hash_lines = Actions.sh("#{git_command} | wc -l", log: params[:debug]).chomp
55
-
56
- if hash_lines.to_i == 1
57
- UI.message("First commit of the branch is taken as a begining of next release")
58
- return {
59
- # here we know this command will return 1 line
60
- hash: Actions.sh(git_command, log: params[:debug]).chomp
61
- }
62
- end
63
-
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
69
-
70
- # even fallback tag doesn't work
71
- if tag.empty?
72
- return false
73
- end
54
+ # Use tail -n 1 to handle repos with multiple root commits (e.g. merged histories)
55
+ UI.message("First commit of the branch is taken as a begining of next release")
56
+ return {
57
+ hash: Actions.sh("#{git_command} | tail -n 1", log: params[:debug]).chomp
58
+ }
74
59
  end
75
60
 
76
61
  # Tag's format is v2.3.4-5-g7685948
@@ -218,8 +203,8 @@ module Fastlane
218
203
  def self.is_codepush_friendly(params)
219
204
  git_command = "git rev-list --max-parents=0 HEAD"
220
205
  # Begining of the branch is taken for codepush analysis
221
- hash_lines = Actions.sh("#{git_command} | wc -l", log: params[:debug]).chomp
222
- hash = Actions.sh(git_command, log: params[:debug]).chomp
206
+ # Use tail -n 1 to handle repos with multiple root commits (e.g. merged histories)
207
+ hash = Actions.sh("#{git_command} | tail -n 1", log: params[:debug]).chomp
223
208
  next_major = 0
224
209
  next_minor = 0
225
210
  next_patch = 0
@@ -228,13 +213,6 @@ module Fastlane
228
213
  base_patch = next_patch
229
214
  last_incompatible_codepush_version = '0.0.0'
230
215
 
231
- if hash_lines.to_i > 1
232
- UI.error("#{git_command} resulted to more than 1 hash")
233
- UI.error('This usualy happens when you pull only part of a git history. Check out how you pull the repo! "git fetch" should be enough.')
234
- Actions.sh(git_command, log: true).chomp
235
- return false
236
- end
237
-
238
216
  # Get commits log between last version and head
239
217
  splitted = get_commits_from_hash(
240
218
  hash: hash,
@@ -7,7 +7,7 @@ module Fastlane
7
7
  class SemanticReleaseHelper
8
8
  def self.format_patterns
9
9
  return {
10
- "default" => /^(docs|fix|feat|chore|style|refactor|perf|test)(?:\((.*)\))?(!?): (.*)/,
10
+ "default" => /^(docs|fix|feat|chore|style|refactor|perf|test)(?:\((.*)\))?(!?): (.*)/i,
11
11
  "angular" => /^(\w*)(?:\((.*)\))?(): (.*)/
12
12
  }
13
13
  end
@@ -52,7 +52,7 @@ module Fastlane
52
52
  }
53
53
 
54
54
  unless matched.nil?
55
- type = matched[1]
55
+ type = matched[1].downcase
56
56
  scope = matched[2]
57
57
 
58
58
  result[:is_valid] = true
@@ -1 +1 @@
1
- module Fastlane module SemanticRelease VERSION = "1.19.0" end end
1
+ module Fastlane module SemanticRelease VERSION = "1.19.1" end end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-semantic_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jiří Otáhal