fastlane-plugin-semantic_release 1.8.0 → 1.9.0

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: 991694d09785835a5aee8a33b9d53ba0d30294942a13abbb5611a6a82b45022f
4
- data.tar.gz: a65c5eb20db107b72792baad5bcf6e3e49629703f878cd0228530a2c892f48c8
3
+ metadata.gz: d31080ed0e60026d8e691194ddb620b276fa4138a2347af0da76c6da03660985
4
+ data.tar.gz: 3114545c304b7636d58ac3b16ddc315de4ae283980039b76eeb9342dd6dab799
5
5
  SHA512:
6
- metadata.gz: 9d71f3cb33ac74a94a761a48d72ca42acd3babc5d9d8234352346bd56dd55ad4d79685be372f2c1e1d9ec834947ec53074fcd66146381a80d26b10870b3bdb58
7
- data.tar.gz: b32097e494de9908a958039e115dfdff3e1cbc9a2d9f26bf59099cbc5803fa8bc998c776517a72978410056f8d9ceaec2c653936c3142ecd6b42f66e7c87ca94
6
+ metadata.gz: eb2c1ce206ff206e108f31d19490bc7855991bb69ed514209750bb5d664b9784f86123e9309a690608f35d5b2a215e651b767782a4887e2ba541acbf31a792d1
7
+ data.tar.gz: c11abd5f99fd43483c149eb594fa76ca6bab6970510396e17fa0af08a698c7f5577a1d82893c201c7d4679278cb6ccde74d8685bd63f0327d19c67ef578d7cfb
@@ -19,7 +19,7 @@ module Fastlane
19
19
  def self.get_last_tag(params)
20
20
  # Try to find the tag
21
21
  command = "git describe --tags --match=#{params[:match]}"
22
- Actions.sh(command, log: false)
22
+ Actions.sh(command, log: params[:debug])
23
23
  rescue
24
24
  UI.message("Tag was not found for match pattern - #{params[:match]}")
25
25
  ''
@@ -27,11 +27,15 @@ module Fastlane
27
27
 
28
28
  def self.get_last_tag_hash(params)
29
29
  command = "git rev-list -n 1 refs/tags/#{params[:tag_name]}"
30
- Actions.sh(command, log: false).chomp
30
+ Actions.sh(command, log: params[:debug]).chomp
31
31
  end
32
32
 
33
33
  def self.get_commits_from_hash(params)
34
- commits = Helper::SemanticReleaseHelper.git_log('%s|%b|>', params[:hash])
34
+ commits = Helper::SemanticReleaseHelper.git_log(
35
+ pretty: '%s|%b|>',
36
+ start: params[:hash],
37
+ debug: params[:debug]
38
+ )
35
39
  commits.split("|>")
36
40
  end
37
41
 
@@ -42,12 +46,15 @@ module Fastlane
42
46
  # Default last version
43
47
  version = '0.0.0'
44
48
 
45
- tag = get_last_tag(match: params[:match])
49
+ tag = get_last_tag(
50
+ match: params[:match],
51
+ debug: params[:debug]
52
+ )
46
53
 
47
54
  if tag.empty?
48
55
  UI.message("First commit of the branch is taken as a begining of next release")
49
56
  # If there is no tag found we taking the first commit of current branch
50
- hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: false).chomp
57
+ hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: params[:debug]).chomp
51
58
  else
52
59
  # Tag's format is v2.3.4-5-g7685948
53
60
  # See git describe man page for more info
@@ -60,7 +67,10 @@ module Fastlane
60
67
 
61
68
  version = parsed_version[0]
62
69
  # Get a hash of last version tag
63
- hash = get_last_tag_hash(tag_name: tag_name)
70
+ hash = get_last_tag_hash(
71
+ tag_name: tag_name,
72
+ debug: params[:debug]
73
+ )
64
74
 
65
75
  UI.message("Found a tag #{tag_name} associated with version #{version}")
66
76
  end
@@ -71,7 +81,10 @@ module Fastlane
71
81
  next_patch = (version.split('.')[2] || 0).to_i
72
82
 
73
83
  # Get commits log between last version and head
74
- splitted = get_commits_from_hash(hash: hash)
84
+ splitted = get_commits_from_hash(
85
+ hash: hash,
86
+ debug: params[:debug]
87
+ )
75
88
 
76
89
  UI.message("Found #{splitted.length} commits since last release")
77
90
  releases = params[:releases]
@@ -131,14 +144,17 @@ module Fastlane
131
144
 
132
145
  def self.is_codepush_friendly(params)
133
146
  # Begining of the branch is taken for codepush analysis
134
- hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: false).chomp
147
+ hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: params[:debug]).chomp
135
148
  next_major = 0
136
149
  next_minor = 0
137
150
  next_patch = 0
138
151
  last_incompatible_codepush_version = '0.0.0'
139
152
 
140
153
  # Get commits log between last version and head
141
- splitted = get_commits_from_hash(hash: hash)
154
+ splitted = get_commits_from_hash(
155
+ hash: hash,
156
+ debug: params[:debug]
157
+ )
142
158
  releases = params[:releases]
143
159
  codepush_friendly = params[:codepush_friendly]
144
160
 
@@ -226,6 +242,13 @@ module Fastlane
226
242
  default_value: [],
227
243
  type: Array,
228
244
  optional: true
245
+ ),
246
+ FastlaneCore::ConfigItem.new(
247
+ key: :debug,
248
+ description: "True if you want to log out a debug info",
249
+ default_value: false,
250
+ type: Boolean,
251
+ optional: true
229
252
  )
230
253
  ]
231
254
  end
@@ -8,7 +8,11 @@ module Fastlane
8
8
 
9
9
  class ConventionalChangelogAction < Action
10
10
  def self.get_commits_from_hash(params)
11
- commits = Helper::SemanticReleaseHelper.git_log('%s|%b|%H|%h|%an|%at|>', params[:hash])
11
+ commits = Helper::SemanticReleaseHelper.git_log(
12
+ pretty: '%s|%b|%H|%h|%an|%at|>',
13
+ start: params[:hash],
14
+ debug: params[:debug]
15
+ )
12
16
  commits.split("|>")
13
17
  end
14
18
 
@@ -27,7 +31,10 @@ module Fastlane
27
31
  version = lane_context[SharedValues::RELEASE_NEXT_VERSION]
28
32
 
29
33
  # Get commits log between last version and head
30
- commits = get_commits_from_hash(hash: last_tag_hash)
34
+ commits = get_commits_from_hash(
35
+ hash: last_tag_hash,
36
+ debug: params[:debug]
37
+ )
31
38
  parsed = parse_commits(commits)
32
39
 
33
40
  commit_url = params[:commit_url]
@@ -263,6 +270,13 @@ module Fastlane
263
270
  default_value: true,
264
271
  type: Boolean,
265
272
  optional: true
273
+ ),
274
+ FastlaneCore::ConfigItem.new(
275
+ key: :debug,
276
+ description: "True if you want to log out a debug info",
277
+ default_value: false,
278
+ type: Boolean,
279
+ optional: true
266
280
  )
267
281
  ]
268
282
  end
@@ -8,9 +8,9 @@ module Fastlane
8
8
  # class methods that you define here become available in your action
9
9
  # as `Helper::SemanticReleaseHelper.your_method`
10
10
  #
11
- def self.git_log(pretty, start)
12
- command = "git log --pretty='#{pretty}' --reverse #{start}..HEAD"
13
- Actions.sh(command, log: false).chomp
11
+ def self.git_log(params)
12
+ command = "git log --pretty='#{params[:pretty]}' --reverse #{params[:start]}..HEAD"
13
+ Actions.sh(command, log: params[:debug]).chomp
14
14
  end
15
15
 
16
16
  def self.parse_commit(params)
@@ -1 +1 @@
1
- module Fastlane module SemanticRelease VERSION = "1.8.0" end end
1
+ module Fastlane module SemanticRelease VERSION = "1.9.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.8.0
4
+ version: 1.9.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: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry