fastlane-plugin-stream_actions 0.3.80 → 0.3.82

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: 1d7287766408959b2a1e4d117b8527606b782354d558a23438710c2e214e4849
4
- data.tar.gz: ea05d93c6048d0429298496eda59df7cdb798f0026459c6ced2c698643e0992c
3
+ metadata.gz: 0f5d2ea7cf84f8af698de5cb42fb4a759c3cbd8278eaa3c173759818d467fd33
4
+ data.tar.gz: f9996795cb9f72b912babf9fab3deae2839ebea798be031326d7acd0d392a46f
5
5
  SHA512:
6
- metadata.gz: 6efbae6d488b7b12eaa2946f43daab013a1265d00c209bb1eab509cff5c612fcbf99f4ed6080be27a7295764c087320d29659f683a67904b4ae22f391e4294d5
7
- data.tar.gz: 2047b5582ec743aa613e0b98b77c4287365a259682f13d178042a76f6d7400c267179a4704fb341fc852e62623f22fcd93dd0c605c47defd44fc9e1d89b39cb2
6
+ metadata.gz: 7235ad866cc08903c009e5eb482fa2c8f41191f9edacf4ee9542d1ad88f6ee350a0806dbe69b5868c1345630bf313c5cce8e1762cfd291304a5cccb057f9fe81
7
+ data.tar.gz: b4aa1f4d0837f58417333cb40c2dff21de2b31beaf22c6beb16c6dc8de598f180bf8648585bf137841c43b6258777fa2f9919300b3ab906e3f0da62a9632b06e
@@ -3,18 +3,19 @@ module Fastlane
3
3
  class ReadChangelogAction < Action
4
4
  def self.run(params)
5
5
  UI.message("Getting changelog for #{params[:version]}")
6
- reading_changelog = false
7
- changes = ''
8
- changelog_lines = File.readlines(params[:changelog_path])
9
- changelog_lines.each do |line|
10
- start_token = '# ['
11
- if reading_changelog
12
- break if line.start_with?(start_token)
13
6
 
14
- changes << line
7
+ changes = ''
8
+ start_token = '# '
9
+ version_found = false
10
+ File.readlines(params[:changelog_path]).each do |line|
11
+ unless version_found
12
+ version_found = line.start_with?("#{start_token}#{params[:version]}") || line.start_with?("#{start_token}[#{params[:version]}")
13
+ next
15
14
  end
16
15
 
17
- reading_changelog = true if line.start_with?("#{start_token}#{params[:version]}")
16
+ break if line.start_with?(start_token)
17
+
18
+ changes << line
18
19
  end
19
20
 
20
21
  UI.user_error!("No changelog found for #{params[:version]}") unless changes.length > 0
@@ -41,7 +41,11 @@ module Fastlane
41
41
 
42
42
  changelog =
43
43
  if params[:use_changelog]
44
- other_action.read_changelog(version: params[:app_version], changelog_path: params[:changelog_path])
44
+ version = params[:is_manual_upload] ? 'Upcoming' : params[:app_version]
45
+ other_action.read_changelog(
46
+ version: version,
47
+ changelog_path: params[:changelog_path]
48
+ ).gsub(/^### (.+)$/) { $1.upcase }.gsub(%r{\[(#\d+)\]\(https?://[^)]+\)}, '(\1)')
45
49
  else
46
50
  testflight_instructions(params)
47
51
  end
@@ -171,6 +175,12 @@ module Fastlane
171
175
  description: 'Build configuration',
172
176
  default_value: 'Release'
173
177
  ),
178
+ FastlaneCore::ConfigItem.new(
179
+ key: :is_manual_upload,
180
+ description: 'Treat this as a manual upload',
181
+ is_string: false,
182
+ default_value: false
183
+ ),
174
184
  FastlaneCore::ConfigItem.new(
175
185
  key: :use_changelog,
176
186
  description: 'Use the changelog as a testflight instructions',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.80'
3
+ VERSION = '0.3.82'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.80
4
+ version: 0.3.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream