Skip to content

Commit

Permalink
Create lane to enable customer center (#4191)
Browse files Browse the repository at this point in the history
This lane will do the cherry pick command that enables the customer
center, without the need to check the commit hash
  • Loading branch information
vegaro authored and nyeu committed Oct 1, 2024
1 parent eac394b commit c0e9944
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,27 @@ platform :ios do
end
end

desc "Enable customer center development by cherry-picking a specific commit"
lane :enable_customer_center do |options|
commit_hash = options[:commit_hash] || "517ad0bf5"

UI.message("Applying changes from commit to enable customer center: #{commit_hash}")

begin
sh("git", "cherry-pick", "--no-commit", commit_hash)
UI.success("Successfully applied changes for customer center development from commit #{commit_hash}")
UI.important("Changes are now in your working directory. Review and stage/commit as needed.")
rescue => ex
UI.error("Failed to enable customer center. Error while applying changes from commit #{commit_hash}")
UI.error(ex.message)

if UI.confirm("Do you want to abort the customer center enablement?")
sh("git", "cherry-pick", "--abort")
UI.message("Customer center enablement aborted")
end
end
end

private_lane :sandbox_testers_delete do |options|
email_pattern = options[:email_pattern]

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 @@ Updates purchases-ios-snapshots-commit to point to latest commit on main

Create or delete sandbox testers

### ios enable_customer_center

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

Enable customer center development by cherry-picking a specific commit

----


Expand Down

0 comments on commit c0e9944

Please sign in to comment.