Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ GEM
fastlane
pry
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
fastlane-plugin-stream_actions (0.3.71)
fastlane-plugin-stream_actions (0.3.76)
xctest_list (= 1.2.1)
fastlane-plugin-versioning (0.6.0)
ffi (1.17.0)
Expand Down Expand Up @@ -427,7 +427,7 @@ DEPENDENCIES
fastlane-plugin-create_xcframework
fastlane-plugin-lizard
fastlane-plugin-sonarcloud_metric_kit
fastlane-plugin-stream_actions (= 0.3.71)
fastlane-plugin-stream_actions (= 0.3.76)
fastlane-plugin-versioning
jazzy
json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import Foundation

enum SystemEnvironment {
/// A Stream Chat version.
public static let version: String = "4.66.0"
public static let version: String = "4.66.0-SNAPSHOT"
}
14 changes: 12 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ lane :release do |options|
File.write(artifacts_path, JSON.dump(artifacts))

# Set the framework version in SystemEnvironment+Version.swift
new_content = File.read(swift_environment_path).gsub!(previous_version_number, release_version)
new_content = File.read(swift_environment_path).gsub!(previous_version_number, release_version).gsub!('-SNAPSHOT', '')
File.open(swift_environment_path, 'w') { |f| f.puts(new_content) }

# Update sdk sizes
Expand All @@ -101,11 +101,17 @@ end

lane :merge_main do
merge_main_to_develop
current_version = get_sdk_version_from_environment
add_snapshot_to_current_version(file_path: swift_environment_path)
ensure_git_branch(branch: 'develop')
sh("git add #{swift_environment_path}")
sh("git commit -m 'Add snapshot postfix to v#{current_version}'")
sh('git push')
end

desc "Publish a new release to GitHub and CocoaPods"
lane :publish_release do |options|
release_version = File.read(swift_environment_path).match(/String\s+=\s+"([\d.]+)"/)[1]
release_version = get_sdk_version_from_environment
UI.user_error!("Release #{release_version} has already been published.") if git_tag_exists(tag: release_version, remote: true)
UI.user_error!('Release version cannot be empty') if release_version.to_s.empty?
ensure_git_branch(branch: 'main')
Expand All @@ -128,6 +134,10 @@ lane :publish_release do |options|
update_spm(version: release_version)
end

lane :get_sdk_version_from_environment do
File.read(swift_environment_path).match(/String\s+=\s+"([\d.]+).*"/)[1]
end

private_lane :appstore_api_key do
@appstore_api_key ||= app_store_connect_api_key(
key_id: 'MT3PRT8TB7',
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
gem 'fastlane-plugin-versioning'
gem 'fastlane-plugin-sonarcloud_metric_kit'
gem 'fastlane-plugin-create_xcframework'
gem 'fastlane-plugin-stream_actions', '0.3.71'
gem 'fastlane-plugin-stream_actions', '0.3.76'
Loading