Skip to content

Commit

Permalink
Switch to using Brew Bundle for deps (#1451)
Browse files Browse the repository at this point in the history
## Summary
Rather than coding in `brew install` in random places, this unifies it all into the one file.

## Any other notes
I'm ignoring the lock file because it's not actually a lock file; it does not control which versions are installed in any way, it's just notes about what was installed.
  • Loading branch information
zacwest authored Feb 2, 2021
1 parent 07430db commit 67a3d32
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
restore-keys: |
${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}
- name: Install Brews
run: brew bundle

- name: Install Gems
run: |
bundle config path vendor/bundle
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install Brews
run: brew bundle

- name: Install Gems
run: |
bundle config path vendor/bundle
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/download_localized_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
with:
ssh-key: ${{ secrets.HOMEASSISTANT_SSH_DEPLOY_KEY }}

- name: Install Lokalise2
run: |
brew tap lokalise/cli-2
brew install lokalise2
- name: Install Brews
run: brew bundle

- name: Install Gems
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ dSYMs/
Configuration/HomeAssistant.overrides.xcconfig

*.profraw
Brewfile.lock.json
4 changes: 4 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tap "lokalise/cli-2"
tap "getsentry/tools"
brew "lokalise2"
brew "sentry-cli"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ Home Assistant for Apple Platforms

## Getting Started

Home Assistant uses Bundler and Cocoapods to manage build dependencies. You'll need Xcode 12.3 (or later) which you can download from the [App Store](https://developer.apple.com/download/). You can get the app running using the following commands:
Home Assistant uses Bundler, Homebrew and Cocoapods to manage build dependencies. You'll need Xcode 12.3 (or later) which you can download from the [App Store](https://developer.apple.com/download/). You can get the app running using the following commands:

```bash
git clone https://github.com/home-assistant/iOS.git
cd iOS
# if you don't have bundler already, [sudo] gem install bundler
# if you don't have homebrew already, install from https://brew.sh
brew bundle
bundle install
bundle exec pod install --repo-update
```
Expand Down
26 changes: 10 additions & 16 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,13 @@ end

desc "Download latest localization files from Lokalize"
lane :update_strings do |options|
token = prompt(
token = ENV["LOKALISE_API_TOKEN"] || prompt(
text: "API token",
ci_input: ENV["LOKALISE_API_TOKEN"],
secure_text: true
)

project_id = prompt(
project_id = ENV["LOKALISE_PROJECT_ID"] || prompt(
text: "Project ID",
ci_input: ENV["LOKALISE_PROJECT_ID"],
secure_text: true
)

Expand Down Expand Up @@ -135,15 +133,13 @@ lane :push_strings do |options|
'../Sources/App/Resources/en.lproj',
]

token = prompt(
token = ENV["LOKALISE_API_TOKEN"] || prompt(
text: "API token",
ci_input: ENV["LOKALISE_API_TOKEN"],
secure_text: true
)

project_id = prompt(
project_id = ENV["LOKALISE_PROJECT_ID"] || prompt(
text: "Project ID",
ci_input: ENV["LOKALISE_PROJECT_ID"],
secure_text: true
)

Expand Down Expand Up @@ -259,8 +255,6 @@ lane :setup_ha_ci do
end

import_provisioning_profiles

sh("brew install getsentry/tools/sentry-cli")
end

desc "Run tests"
Expand Down Expand Up @@ -316,12 +310,12 @@ private_lane :upload_archive_to_sentry do
end

private_lane :upload_binary_to_apple do |options|
sh(
"xcrun", "altool", "--upload-app", "--type", options[:type],
"--file", options[:path],
"--username", ENV["DELIVER_USERNAME"],
"--password", '@env:FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD'
)
sh(
"xcrun", "altool", "--upload-app", "--type", options[:type],
"--file", options[:path],
"--username", ENV["DELIVER_USERNAME"],
"--password", '@env:FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD'
)
end

platform :ios do
Expand Down

0 comments on commit 67a3d32

Please sign in to comment.