Skip to content

Conversation

spencertransier
Copy link
Contributor

@spencertransier spencertransier commented May 29, 2023

This PR changes a few things in the Fastfile (and minor changes to the Podfile and Gemfile):

  • Adds constants for file paths, the xcworkspace, and schemes that are used multiple times throughout the lanes
  • Replace explicit paths with File.join
  • Increased the readability of method calls by breaking out the arguments onto separate lines
  • Removed the register_new_device lane because it's been replaced by the MC tool

@spencertransier spencertransier added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label May 29, 2023
@spencertransier spencertransier requested a review from a team May 29, 2023 21:50
@spencertransier spencertransier added this to the 13.9 milestone May 29, 2023
Comment on lines -1077 to -1101
def fastlane_directory
__dir__
end

def derived_data_directory
File.join(fastlane_directory, 'DerivedData')
end

def screenshots_directory
File.join(fastlane_directory, 'screenshots')
end

def screenshot_devices
[
'iPhone 11 Pro Max',
'iPhone 8 Plus',
'iPad Pro (12.9-inch) (2nd generation)',
'iPad Pro (12.9-inch) (3rd generation)'
]
end

def simulator_version
'14.4'
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The values in these methods were already stored in constants at the top of the Fastfile. I verified that they aren't being used anywhere.

Comment on lines -444 to +497
xcversion() # Ensure we're using the right version of Xcode, defined in `.xcode-version` file
xcversion # Ensure we're using the right version of Xcode, defined in `.xcode-version` file
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 know xcversion has been deprecated in favor of xcodes, but I decided to hold off on switching over to xcodes until I could fully test out the change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Related: Andrew is working on updating from xcversion to xcodes in Tumblr iOS too.

As I mentioned in my comment over there, I remember that we had issues with xcodes vs Apple APIs now being authenticated back when @mokagio tried to migrate WCiOS to xcodes on Nov 22 and that's why that Draft PR was never merged.
I'm hoping that all of this has been fixed in xcodes/fastlane since all that (this comment makes me hopeful that it was) so I'm hoping this won't cause any issue anymore, but worth double-checking to be sure anyway—and maybe coordinate with Andrew's testing it on Tumblr-iOS to share your conclusions?

Comment on lines -616 to -626
#####################################################################################
# register_new_device
# -----------------------------------------------------------------------------------
# This lane helps a developer register a new device in the App Store Portal
# -----------------------------------------------------------------------------------
# Usage:
# bundle exec fastlane register_new_device
#
# Example:
# bundle exec fastlane register_new_device
#####################################################################################
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced by the MC tool.

repository: GITHUB_REPO,
milestone: new_version
)
ios_check_beta_deps(podfile: File.join(PROJECT_ROOT_FOLDER, 'Podfile')
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing an closing ) at the end.

@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr9834-b31f146 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@spencertransier spencertransier merged commit 9e36966 into trunk May 30, 2023
@spencertransier spencertransier deleted the update/fastfile branch May 30, 2023 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants