Skip to content

Commit 86d1c57

Browse files
[CI] Bump snapshot version after every release (#855)
1 parent 31bd270 commit 86d1c57

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ GEM
2626
ast (2.4.3)
2727
atomos (0.1.3)
2828
aws-eventstream (1.4.0)
29-
aws-partitions (1.1112.0)
29+
aws-partitions (1.1114.0)
3030
aws-sdk-core (3.225.1)
3131
aws-eventstream (~> 1, >= 1.3.0)
3232
aws-partitions (~> 1, >= 1.992.0)
3333
aws-sigv4 (~> 1.9)
3434
base64
3535
jmespath (~> 1, >= 1.6.1)
3636
logger
37-
aws-sdk-kms (1.103.0)
37+
aws-sdk-kms (1.104.0)
3838
aws-sdk-core (~> 3, >= 3.225.0)
3939
aws-sigv4 (~> 1.5)
4040
aws-sdk-s3 (1.189.0)
@@ -159,7 +159,7 @@ GEM
159159
faraday_middleware (1.2.1)
160160
faraday (~> 1.0)
161161
fastimage (2.4.0)
162-
fastlane (2.227.2)
162+
fastlane (2.228.0)
163163
CFPropertyList (>= 2.3, < 4.0.0)
164164
addressable (>= 2.8, < 3.0.0)
165165
artifactory (~> 3.0)
@@ -207,7 +207,7 @@ GEM
207207
fastlane
208208
pry
209209
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
210-
fastlane-plugin-stream_actions (0.3.82)
210+
fastlane-plugin-stream_actions (0.3.83)
211211
xctest_list (= 1.2.1)
212212
fastlane-plugin-versioning (0.7.1)
213213
fastlane-sirp (1.0.0)
@@ -284,7 +284,7 @@ GEM
284284
mutex_m (0.3.0)
285285
nanaimo (0.4.0)
286286
nap (1.1.0)
287-
naturally (2.2.1)
287+
naturally (2.2.2)
288288
netrc (0.11.0)
289289
nio4r (2.7.4)
290290
nkf (0.2.0)
@@ -342,7 +342,7 @@ GEM
342342
rubocop-ast (>= 1.23.0, < 2.0)
343343
ruby-progressbar (~> 1.7)
344344
unicode-display_width (>= 1.4.0, < 3.0)
345-
rubocop-ast (1.45.0)
345+
rubocop-ast (1.45.1)
346346
parser (>= 3.3.7.2)
347347
prism (~> 1.4)
348348
rubocop-performance (1.19.1)
@@ -421,7 +421,7 @@ DEPENDENCIES
421421
fastlane-plugin-create_xcframework
422422
fastlane-plugin-lizard
423423
fastlane-plugin-sonarcloud_metric_kit
424-
fastlane-plugin-stream_actions (= 0.3.82)
424+
fastlane-plugin-stream_actions (= 0.3.83)
425425
fastlane-plugin-versioning
426426
json
427427
plist

fastlane/Fastfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ end
7777

7878
desc 'Release a new version'
7979
lane :release do |options|
80-
previous_version_number = last_git_tag
8180
artifacts_path = File.absolute_path('../StreamChatSwiftUIArtifacts.json')
8281
extra_changes = lambda do |release_version|
8382
# Set the framework version on the artifacts
@@ -86,7 +85,9 @@ lane :release do |options|
8685
File.write(artifacts_path, JSON.dump(artifacts))
8786

8887
# Set the framework version in SystemEnvironment+Version.swift
89-
new_content = File.read(swift_environment_path).gsub!(previous_version_number, release_version).gsub('-SNAPSHOT', '')
88+
old_content = File.read(swift_environment_path)
89+
current_version = old_content[/version: String = "([^"]+)"/, 1]
90+
new_content = old_content.gsub(current_version, release_version)
9091
File.open(swift_environment_path, 'w') { |f| f.puts(new_content) }
9192

9293
# Update sdk sizes
@@ -112,11 +113,10 @@ end
112113

113114
lane :merge_main do
114115
merge_main_to_develop
115-
current_version = get_sdk_version_from_environment
116-
add_snapshot_to_current_version(file_path: swift_environment_path)
116+
update_release_version_to_snapshot(file_path: swift_environment_path)
117117
ensure_git_branch(branch: 'develop')
118118
sh("git add #{swift_environment_path}")
119-
sh("git commit -m 'Add snapshot postfix to v#{current_version}'")
119+
sh("git commit -m 'Update release version to snapshot'")
120120
sh('git push')
121121
end
122122

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
gem 'fastlane-plugin-versioning'
66
gem 'fastlane-plugin-sonarcloud_metric_kit'
77
gem 'fastlane-plugin-create_xcframework'
8-
gem 'fastlane-plugin-stream_actions', '0.3.82'
8+
gem 'fastlane-plugin-stream_actions', '0.3.83'

0 commit comments

Comments
 (0)