Skip to content

Conversation

@spencertransier
Copy link
Contributor

@spencertransier spencertransier commented Jan 19, 2023

What does it do?

Many of the Release Toolkit actions only included iOS in the available platforms that could be used with that action. With Day One Mac, most of those actions can be used on Mac as well as iOS. This PR adds Mac as a supported platform for all the relevant actions so Day One Mac can use them as well. I went ahead and updated all the relevant actions even if Day One Mac isn't currently using them, just for the sake of not having to make a new Release Toolkit release in the future in case more of them end up being needed.

For the two actions I changed in the common folder, I switched them from [:ios, :android].include?(platform) to true to match the other actions in common.

For the actions in the ios folder, I changed them from platform == :ios to [:ios, :mac.include?(platform). A few of them had already been updated, I assume for Simplenote Mac.

I know it may not make sense to have Mac support in Release Toolkit actions that are specifically labeled "iOS". Because Day One Mac and Simplenote Mac are the only Automattic apps that might even potentially use them right now, I think it makes sense to just add Mac support for these actions rather than duplicating them into a separate mac folder. Especially because all of those actions would be just be exact copies of the code within the iOS actions.

How to Test

  1. In an app like WordPress-iOS, open the Gemfile and change it from this:
# gem 'fastlane-plugin-wpmreleasetoolkit', git: '[email protected]:wordpress-mobile/release-toolkit', branch: 'trunk'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 6.0'

to this:

gem 'fastlane-plugin-wpmreleasetoolkit', git: '[email protected]:wordpress-mobile/release-toolkit', branch: 'add/mac-support-in-ios-actions'
# gem 'fastlane-plugin-wpmreleasetoolkit', '~> 6.0'
  1. Run bundle install to get the changes from this PR's branch
  2. Add this to the Fastfile:
platform :mac do
  lane :test_mac_support do
    ios_get_app_version
  end
end
  1. Run bundle exec fastlane mac test_mac_support
  2. That command should successfully run. Before this PR, it would give an error about Mac not being a supported platform for that action.

Checklist before requesting a review

  • Run bundle exec rubocop to test for code style violations and recommendations
  • Add Unit Tests (aka specs/*_spec.rb) if applicable
  • Run bundle exec rspec to run the whole test suite and ensure all your tests pass
  • Make sure you added an entry in the CHANGELOG.md file to describe your changes under the approprioate existing ### subsection of the existing ## Trunk section.

@spencertransier spencertransier added the enhancement New feature or request label Jan 19, 2023
@spencertransier spencertransier requested a review from a team January 19, 2023 16:40
@spencertransier spencertransier marked this pull request as ready for review January 19, 2023 17:18
@spencertransier spencertransier merged commit 5434f13 into trunk Jan 19, 2023
@spencertransier spencertransier deleted the add/mac-support-in-ios-actions branch January 19, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants