Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update StreamChat dependency to 4.69.0 #686

Closed
Closed
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
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.67.0"),
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.69.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion StreamChatSwiftUI-XCFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |spec|

spec.framework = 'Foundation', 'UIKit', 'SwiftUI'

spec.dependency 'StreamChat-XCFramework', '~> 4.68.0'
spec.dependency 'StreamChat-XCFramework', '~> 4.69.0'

spec.cocoapods_version = '>= 1.11.0'
end
2 changes: 1 addition & 1 deletion StreamChatSwiftUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Pod::Spec.new do |spec|

spec.framework = 'Foundation', 'UIKit', 'SwiftUI'

spec.dependency 'StreamChat', '~> 4.68.0'
spec.dependency 'StreamChat', '~> 4.69.0'
end
2 changes: 1 addition & 1 deletion StreamChatSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3824,7 +3824,7 @@
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.68.0;
minimumVersion = 4.69.0;
};
};
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
Expand Down
34 changes: 34 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,40 @@ private_lane :appstore_api_key do
)
end

desc "Updates StreamChat dependency locally. Usage: `bundle exec fastlane update_stream_chat version:4.56.0`"
lane :update_stream_chat do |options|
raise UI.user_error!('Provide a version.') unless options[:version]

Dir.chdir('..') do
file = 'Package.swift'
current_stream_chat_version = File.read(file)[/stream-chat-swift\.git", from: "([\d.]+)"\)/, 1]
File.write(file, File.read(file).gsub(/(stream-chat-swift\.git", from: ")[\d.]+"/, "\\1#{options[:version]}\""))

file = 'StreamChatSwiftUI-XCFramework.podspec'
File.write(file, File.read(file).gsub(/(StreamChat-XCFramework', '~> )[\d.]+'/, "\\1#{options[:version]}'"))

file = 'StreamChatSwiftUI.podspec'
File.write(file, File.read(file).gsub(/(StreamChat', '~> )[\d.]+'/, "\\1#{options[:version]}'"))

file = 'StreamChatSwiftUI.xcodeproj/project.pbxproj'
content = File.read(file)
if content.include?("minimumVersion = #{current_stream_chat_version}")
File.write(file, content.gsub("minimumVersion = #{current_stream_chat_version}", "minimumVersion = #{options[:version]}"))
elsif content.include?('branch = develop')
File.write(file, content.gsub('kind = branch', "minimumVersion = #{options[:version]}").gsub('branch = develop', 'kind = upToNextMajorVersion'))
else
UI.user_error!("Something went wrong after trying to modify #{file}.")
end
end

pr_create(
title: "Update StreamChat dependency to #{options[:version]}",
base_branch: 'develop',
head_branch: "ci/update-stream-chat-dependency-#{Time.now.to_i}",
github_repo: github_repo
)
end

lane :pod_lint do
lint_required = true
Dir.chdir('..') do
Expand Down
Loading