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

Clone to spm using fastlane #3926

Merged
merged 18 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 14 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
16 changes: 4 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1151,22 +1151,14 @@ jobs:
}

deploy-to-spm:
docker:
- image: cimg/base:stable
resource_class: small
<<: *base-job
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base job is a Mac machine. Can we use something that's faster/cheaper? Maybe a ruby docker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that before (cb9a4d8) but was hitting problems, will try again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

steps:
- checkout
- setup-git-credentials
- install-bundle-dependencies
- run:
name: Clone purchases-ios and push to purchases-ios-spm
command: |
git clone https://github.com/RevenueCat/purchases-ios.git
cd purchases-ios
git fetch --tags
git remote set-url origin https://github.com/RevenueCat/purchases-ios-spm.git
git push origin
git push --tags

command: bundle exec fastlane deploy_to_spm

workflows:
version: 2
generate-snapshot:
Expand Down
10 changes: 10 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,16 @@ platform :ios do
update_snapshots_commit(new_hash)
end

lane :deploy_to_spm do
source_repo = ENV["CIRCLE_REPOSITORY_URL"]
jamesrb1 marked this conversation as resolved.
Show resolved Hide resolved
destination_repo = source_repo.sub(/\.git\z/, "-spm.git")

git_clone_and_push(
source_repo: source_repo,
destination_repo: destination_repo
)
end

desc "Create or delete sandbox testers"
lane :sandbox_testers do
Spaceship::ConnectAPI.login(use_portal: false)
Expand Down
8 changes: 8 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ Clones or updates snapshots repo

Updates purchases-ios-snapshots-commit to point to latest commit on main

### ios deploy_to_spm

```sh
[bundle exec] fastlane ios deploy_to_spm
```



### ios sandbox_testers

```sh
Expand Down