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

Update SwiftLint build phase to check for the Homebrew install directory on Apple Silicon #1000

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

samsymons
Copy link
Contributor

@samsymons samsymons commented Nov 10, 2021

Task/Issue URL: https://app.asana.com/0/414235014887631/1201350547885701/f
Tech Design URL:
CC:

Description:

This PR updates the SwiftLint build phase to check for the default Homebrew install directory on M1 Macs. If you install Homebrew on an M1 Mac and try to build out of the box, it will fail with an error stating that SwiftLint is not installed.

The fix was to add a new section to the build phase that amends the PATH if it sees that the Apple Silicon install directory for Homebrew is present:

if test -d "/opt/homebrew/bin/"; then
    PATH="/opt/homebrew/bin/:${PATH}"
fi

export PATH

Steps to test this PR:

  1. Build this PR on an Intel Mac
  2. Build this PR on an Apple Silicon Mac (I've personally done this and verified that it works)

OS Testing:

  • iOS 13
  • iOS 14
  • iOS 15

Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

Copy link
Collaborator

@jonathanKingston jonathanKingston left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here. Thanks for doing this. I checked out the repo and I was able to compile after the patch was applied.

@samsymons samsymons merged commit 5c903de into develop Nov 23, 2021
@samsymons samsymons deleted the sam/fix-swiftlint-on-m1 branch November 23, 2021 19:48
samsymons added a commit that referenced this pull request Nov 26, 2021
* develop:
  Stop web views from loading during Fire button calls (#1010)
  Fix `Unprotected Sites` toolbar was kept hidden. (#990)
  Add a check for the Homebrew location on M1 Macs. (#1000)
  Bump version number
  Fixes and enhanced stats for recently added debug pixel (#1007)
samsymons added a commit that referenced this pull request Nov 27, 2021
* develop:
  Stop web views from loading during Fire button calls (#1010)
  Fix `Unprotected Sites` toolbar was kept hidden. (#990)
  Add a check for the Homebrew location on M1 Macs. (#1000)
  Bump version number
  Fixes and enhanced stats for recently added debug pixel (#1007)
  Fix Core Data deadlocks (#989)
  Update version number
  Improvements to cookie cleaning (#1002)
  Remove unused TrackingProtectionStats dead code (#996)
  Update version
  Update version number
  Update TDS dependency after latest release (#995)
  Support for Tracker Exceptions (#991)
  Use temp unprotected list and user list for all features (#993)
  Run ESLint on scripts (#984)
  Move to using mutation observing to reduce page overhead (#985)
  Disabling SafeBrowsing due to privacy implications (#992)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants