Skip to content

Commit

Permalink
Fix dependency update lane
Browse files Browse the repository at this point in the history
There is a workflow in ios-bundle repository called "Post Release" which gets
the version and the checksum from the latest version, sends it to an
`update-dependencies` workflow in ios-sdk-widgets, which then executes a
Fastlane lane that uses that info, updates the templates, and generates the new
files. However for some reason, these version and checksum parameters weren't
used in the calling of the Fastlane lane. Now they are called.

Also, now the replacement of the Core SDK version is done first in the template,
then the template is copied to the root folder, and then it is adjusted for the
latest Widgets version. This way, the root podspec and the  template podspec
always have correct Core version. Before, the template was copied first and then
the replacement of the Core SDK was done. This meant the template was always out
of date.

MOB-2770
  • Loading branch information
gersonnoboa authored and yurii-glia committed Oct 19, 2023
1 parent c774f72 commit 61deeaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ workflows:
- command: update
- fastlane@3:
inputs:
- lane: ios create_pr_for_dependencies_update
- lane: ios create_pr_for_dependencies_update version:$VERSION checksum:$CHECKSUM
upload_to_appstore_connect:
steps:
- activate-ssh-key@4:
Expand Down
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ platform :ios do
update_core_sdk_version(core_sdk_version: version, core_sdk_checksum: checksum)

branch_name = 'dependencies-update'
message = "Update dependencies declared in `Podfile`"
message = "Update dependencies declared in `Podfile` and `Package.swift`"

sh "cd .. && scripts/commit_unstaged_changes.sh '#{branch_name}' '#{message}'"
create_pull_request(
Expand All @@ -108,8 +108,8 @@ platform :ios do
core_sdk_checksum = options[:core_sdk_checksum]
UI.user_error!("No Core SDK checksum specified") unless !core_sdk_checksum.nil?

sh("sed -i '' \"s/.*GliaCoreSDK.*/ s.dependency 'GliaCoreSDK', '#{core_sdk_version}'/g\" ../templates/GliaWidgets.podspec")
sh("cp ../templates/GliaWidgets.podspec ../GliaWidgets.podspec")
sh("sed -i '' \"s/.*GliaCoreSDK.*/ s.dependency 'GliaCoreSDK', '#{core_sdk_version}'/g\" ../GliaWidgets.podspec")
sh("sed -i '' \"s/.* s.version.*/ s.version = '#{project_version}'/g\" ../GliaWidgets.podspec")

sh("cp ../templates/Package.swift ../Package.swift")
Expand Down

0 comments on commit 61deeaa

Please sign in to comment.