fastlane-plugin-better_semantic_release 2.0.2 → 2.0.5

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: 07acfe8333f8d51d614bf67934dcce916dc921ab6430cf847b733ca9c1720079
4
- data.tar.gz: 3d06659fa89cb3550264af43d2be11a76bf324d116289d3fa0319f38dd61a298
3
+ metadata.gz: e2e567960e000716fcec33f714dfa4c83514923cffb9e6aa0d89f4bbcb7fc52f
4
+ data.tar.gz: 2770b86e3a819fc0d18e18bd053138b6f8e23456011cc67702d8aa4f7b79d58e
5
5
  SHA512:
6
- metadata.gz: 4a6640db9100bde01932fcda01e0f0d918d5c38f923707475f04bb9ff0548b03d1ae54e218b6d1129baffa4ae2357be3e24a5444c4a4a49e9211c4e434881ba6
7
- data.tar.gz: 7e7f49b2afbfdcb8583fc2fe72dd4b8b97e7b96ad411e3e2c219f55d4c88328f2481d54d7214d621a39b82b816c689b3f810a0da36a7b10e7979bf615ce9b30f
6
+ metadata.gz: 0e4db89d5d4342bcba405d6033c1cc19f679bae0ecd7c6106dd1b77d0768e7a1c5086963cf41f9359a829ceee6dda04a6cc0286e7c95efc28a163ad5bc8c0825
7
+ data.tar.gz: 7b59437f89d7b78b7bd6b6620b50f3f260f7804ba042d878a6cf4e4a0dea4eebabb89124e9324b74329a9afa95ab83eca3d7efd5584840f6c99905281bd8396f
@@ -136,40 +136,43 @@ module Fastlane
136
136
  splitted.each do |squashed_commit|
137
137
  commits = squashed_commit.split("*")
138
138
  commits.drop(1).each do |line|
139
- # conventional commits are in format
140
- # type: subject (fix: app crash - for example)
141
- commit = Helper::BetterSemanticReleaseHelper.parse_commit(
142
- commit_subject: line,
143
- commit_body: line.split(":")[1].strip,
144
- releases: releases,
145
- pattern: format_pattern
146
- )
139
+ parts = line.split(":")
140
+ if parts.length > 1
141
+ # conventional commits are in format
142
+ # type: subject (fix: app crash - for example)
143
+ commit = Helper::BetterSemanticReleaseHelper.parse_commit(
144
+ commit_subject: line,
145
+ commit_body: parts[1].strip,
146
+ releases: releases,
147
+ pattern: format_pattern
148
+ )
149
+
150
+ unless commit[:scope].nil?
151
+ # 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
152
+ scope = commit[:scope]
153
+ scopes_to_ignore = params[:ignore_scopes]
154
+ # if it is, we'll skip this commit when bumping versions
155
+ next if scopes_to_ignore.include?(scope) #=> true
156
+ end
147
157
 
148
- unless commit[:scope].nil?
149
- # 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
150
- scope = commit[:scope]
151
- scopes_to_ignore = params[:ignore_scopes]
152
- # if it is, we'll skip this commit when bumping versions
153
- next if scopes_to_ignore.include?(scope) #=> true
154
- end
158
+ if commit[:release] == "major" || commit[:is_breaking_change]
159
+ next_major += 1
160
+ next_minor = 0
161
+ next_patch = 0
162
+ elsif commit[:release] == "minor"
163
+ next_minor += 1
164
+ next_patch = 0
165
+ elsif commit[:release] == "patch"
166
+ next_patch += 1
167
+ end
155
168
 
156
- if commit[:release] == "major" || commit[:is_breaking_change]
157
- next_major += 1
158
- next_minor = 0
159
- next_patch = 0
160
- elsif commit[:release] == "minor"
161
- next_minor += 1
162
- next_patch = 0
163
- elsif commit[:release] == "patch"
164
- next_patch += 1
165
- end
169
+ unless commit[:is_codepush_friendly]
170
+ is_next_version_compatible_with_codepush = false
171
+ end
166
172
 
167
- unless commit[:is_codepush_friendly]
168
- is_next_version_compatible_with_codepush = false
173
+ next_version = "#{next_major}.#{next_minor}.#{next_patch}"
174
+ UI.message("#{next_version}") if params[:show_version_path]
169
175
  end
170
-
171
- next_version = "#{next_major}.#{next_minor}.#{next_patch}"
172
- UI.message("#{next_version}: #{subject}") if params[:show_version_path]
173
176
  end
174
177
  end
175
178
 
@@ -311,7 +314,7 @@ module Fastlane
311
314
  FastlaneCore::ConfigItem.new(
312
315
  key: :releases,
313
316
  description: "Map types of commit to release (major, minor, patch)",
314
- default_value: { fix: "patch", feat: "minor" },
317
+ default_value: { build: "patch", chore: "patch", ci: "patch", fix: "patch", feat: "minor", perf: "patch", refactor: "patch", style: "patch" },
315
318
  type: Hash
316
319
  ),
317
320
  FastlaneCore::ConfigItem.new(
@@ -1 +1 @@
1
- module Fastlane module BetterSemanticRelease VERSION = "2.0.2" end end
1
+ module Fastlane module BetterSemanticRelease VERSION = "2.0.5" end end
metadata CHANGED
@@ -1,7 +1,7 @@
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.2
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Greco