fastlane-plugin-stream_actions 0.3.79 → 0.3.81

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: 757827efe7f760d11b6d89f14752a514f1fc89cc799a2f9915f3e9225fcf3211
4
- data.tar.gz: cf1d29b995e6a77079ce884c05d35ecdcf75bacd78bfb27c8c9292ad39afe0b8
3
+ metadata.gz: 6bfa783e7d6cc05e42f76fe278a4ecb93f454d6d31eaf9fcd0f30c0c04a1429e
4
+ data.tar.gz: e316a12048505783af39e58e25b79e90d462def241d0be83b0f10f1d40f4f5c4
5
5
  SHA512:
6
- metadata.gz: abc4cec3803672b66d25cd69686facd9345f2ffe99c194cfa95ed002b9bcc3628c3e7871f3f46d838f6ba54d58d215cc80beb080fc729542dfcbef36f1dde5a2
7
- data.tar.gz: 46ec21a0074ed18ecb6268147be0a78abf6123b0e5d0436d59988c20b6b3d39a347cf7c94d635cf88a2d7456024c9eaa9bf64ed0b94cb2e4e575f48135b730cf
6
+ metadata.gz: 80c51b7e7c11923511658ba3a0d85ed49a432a7f4a02ab378da451a830b0b84aec5c023641ffda6b8605be1f10dfe404cac9bebb5cf4e41116645233b0242d11
7
+ data.tar.gz: 946f18f34c07f015c67eb518aefb4592b07576df950983fe5a52ffe7ae52b6a1749b2be221cd515af13fc889f886e29d2f3b7ab32b0b797aa0e635cdba97766f
@@ -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
@@ -39,6 +39,14 @@ module Fastlane
39
39
  xcargs: params[:xcargs]
40
40
  )
41
41
 
42
+ changelog =
43
+ if params[:use_changelog]
44
+ version = params[:is_manual_upload] ? 'Upcoming' : params[:app_version]
45
+ other_action.read_changelog(version: version, changelog_path: params[:changelog_path])
46
+ else
47
+ testflight_instructions(params)
48
+ end
49
+
42
50
  external_groups = other_action.current_branch == 'main' ? ['Public Link'] : []
43
51
  other_action.pilot(
44
52
  api_key: params[:api_key],
@@ -50,7 +58,7 @@ module Fastlane
50
58
  distribute_external: external_groups.any?,
51
59
  notify_external_testers: external_groups.any?,
52
60
  reject_build_waiting_for_review: true,
53
- changelog: testflight_instructions(params)
61
+ changelog: changelog
54
62
  )
55
63
 
56
64
  if params[:github_pr_num] && !params[:github_pr_num].strip.empty?
@@ -62,12 +70,11 @@ module Fastlane
62
70
  def self.testflight_instructions(params)
63
71
  return "This is the official #{params[:app_target]} sample app" unless params[:sdk_target]
64
72
 
65
- version_number = other_action.get_version_number(target: params[:sdk_target])[/\d+\.\d+\.\d/]
66
73
  if ENV['GITHUB_EVENT_NAME'] == 'pull_request'
67
74
  sha = ENV['GITHUB_SHA'] ? ENV['GITHUB_SHA'][0..8] : sh('git rev-parse --short HEAD')
68
75
  "This is the build for Regression testing on release candidate v#{version_number} (sha: #{sha})."
69
76
  else
70
- "This is the official sample app built with iOS #{params[:sdk_target]} SDK v#{version_number}. It's designed " \
77
+ "This is the official sample app built with iOS #{params[:sdk_target]} SDK v#{params[:app_version]}. It's designed " \
71
78
  'to highlight engaging features and new improvements to the SDK, but remember that this is just one ' \
72
79
  'possible implementation. You can start your own by borrowing and customizing the code from this ' \
73
80
  "sample, or build something completely different using Stream's components."
@@ -164,6 +171,24 @@ module Fastlane
164
171
  key: :configuration,
165
172
  description: 'Build configuration',
166
173
  default_value: 'Release'
174
+ ),
175
+ FastlaneCore::ConfigItem.new(
176
+ key: :is_manual_upload,
177
+ description: 'Treat this as a manual upload',
178
+ is_string: false,
179
+ default_value: false
180
+ ),
181
+ FastlaneCore::ConfigItem.new(
182
+ key: :use_changelog,
183
+ description: 'Use the changelog as a testflight instructions',
184
+ is_string: false,
185
+ default_value: false
186
+ ),
187
+ FastlaneCore::ConfigItem.new(
188
+ key: :changelog_path,
189
+ description: 'The path to your project CHANGELOG.md',
190
+ is_string: true,
191
+ default_value: './CHANGELOG.md'
167
192
  )
168
193
  ]
169
194
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.79'
3
+ VERSION = '0.3.81'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.79
4
+ version: 0.3.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-01 00:00:00.000000000 Z
11
+ date: 2025-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xctest_list