Skip to content

Commit 22c910c

Browse files
[CI] Bump snapshot version after every release (#835)
1 parent 9f9787a commit 22c910c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Gemfile.lock

Lines changed: 5 additions & 5 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.1111.0)
30-
aws-sdk-core (3.225.0)
29+
aws-partitions (1.1112.0)
30+
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.102.0)
37+
aws-sdk-kms (1.103.0)
3838
aws-sdk-core (~> 3, >= 3.225.0)
3939
aws-sigv4 (~> 1.5)
4040
aws-sdk-s3 (1.189.0)
@@ -210,7 +210,7 @@ GEM
210210
bundler
211211
fastlane
212212
pry
213-
fastlane-plugin-stream_actions (0.3.82)
213+
fastlane-plugin-stream_actions (0.3.83)
214214
xctest_list (= 1.2.1)
215215
fastlane-plugin-versioning (0.7.1)
216216
fastlane-sirp (1.0.0)
@@ -424,7 +424,7 @@ DEPENDENCIES
424424
fastlane
425425
fastlane-plugin-create_xcframework
426426
fastlane-plugin-lizard
427-
fastlane-plugin-stream_actions (= 0.3.82)
427+
fastlane-plugin-stream_actions (= 0.3.83)
428428
fastlane-plugin-versioning
429429
json
430430
plist

fastlane/Fastfile

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

4141
desc "Release a new version"
4242
lane :release do |options|
43-
previous_version_number = last_git_tag
4443
artifacts_path = File.absolute_path('../StreamVideoArtifacts.json')
4544
extra_changes = lambda do |release_version|
4645
# Set the framework version on the artifacts
@@ -49,7 +48,9 @@ lane :release do |options|
4948
File.write(artifacts_path, JSON.dump(artifacts))
5049

5150
# Set the framework version in SystemEnvironment+Version.swift
52-
new_content = File.read(swift_environment_path).gsub!(previous_version_number, release_version).gsub('-SNAPSHOT', '')
51+
old_content = File.read(swift_environment_path)
52+
current_version = old_content[/version: String = "([^"]+)"/, 1]
53+
new_content = old_content.gsub(current_version, release_version)
5354
File.open(swift_environment_path, 'w') { |f| f.puts(new_content) }
5455

5556
# Update sdk sizes
@@ -75,11 +76,10 @@ end
7576

7677
lane :merge_main do
7778
merge_main_to_develop
78-
current_version = get_sdk_version_from_environment
79-
add_snapshot_to_current_version(file_path: swift_environment_path)
79+
update_release_version_to_snapshot(file_path: swift_environment_path)
8080
ensure_git_branch(branch: 'develop')
8181
sh("git add #{swift_environment_path}")
82-
sh("git commit -m 'Add snapshot postfix to v#{current_version}'")
82+
sh("git commit -m 'Update release version to snapshot'")
8383
sh('git push')
8484
end
8585

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
gem 'fastlane-plugin-versioning'
22
gem 'fastlane-plugin-create_xcframework'
3-
gem 'fastlane-plugin-stream_actions', '0.3.82'
3+
gem 'fastlane-plugin-stream_actions', '0.3.83'

0 commit comments

Comments
 (0)