Skip to content

Commit

Permalink
feat: add homebrew_update parameter to toggle brew update (react-nati…
Browse files Browse the repository at this point in the history
…ve-community#131)

* refactor(ios): move brew update into separate step

* feat(ios): add homebrew_update parameter to setup_macos_executor command

* feat(android): add homebrew_update parameter to android_test job

* feat(ios): add homebrew_update parameter to ios_build job

* feat(ios): add homebrew_update parameter to ios_build_and_test job
  • Loading branch information
fotos authored Jan 30, 2022
1 parent 49c5e4a commit 6a7d635
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/commands/setup_macos_executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ parameters:
description: Should we cache after brew install? Defaults to true
type: boolean
default: true
homebrew_update:
description: Should we run brew update? Defaults to true
type: boolean
default: true

steps:
- run:
Expand Down Expand Up @@ -45,10 +49,16 @@ steps:
name: Verify node version
command: node --version

- when:
condition: <<parameters.homebrew_update>>
steps:
- run:
name: Update brew
command: brew update >/dev/null

- run:
name: Configure Detox Environment
command: |
brew update >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
Expand Down
5 changes: 5 additions & 0 deletions src/jobs/android_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ parameters:
description: Should we cache after brew install? Defaults to true
type: boolean
default: true
homebrew_update:
description: Should we run brew update? Defaults to true
type: boolean
default: true

steps:
- attach_workspace:
at: <<parameters.workspace_root>>
- setup_macos_executor:
node_version: <<parameters.node_version>>
homebrew_cache: <<parameters.homebrew_cache>>
homebrew_update: <<parameters.homebrew_update>>
- yarn_install:
cache: <<parameters.yarn_cache>>
- when:
Expand Down
5 changes: 5 additions & 0 deletions src/jobs/ios_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ parameters:
description: Should we cache after brew install? Defaults to true
type: boolean
default: true
homebrew_update:
description: Should we run brew update? Defaults to true
type: boolean
default: true

steps:
- when:
Expand All @@ -83,6 +87,7 @@ steps:
- setup_macos_executor:
node_version: <<parameters.node_version>>
homebrew_cache: <<parameters.homebrew_cache>>
homebrew_update: <<parameters.homebrew_update>>
- yarn_install:
cache: <<parameters.yarn_cache>>
cache_folder: <<parameters.yarn_cache_folder>>
Expand Down
5 changes: 5 additions & 0 deletions src/jobs/ios_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ parameters:
description: Should we cache after brew install? Defaults to true
type: boolean
default: true
homebrew_update:
description: Should we run brew update? Defaults to true
type: boolean
default: true

steps:
- when:
Expand All @@ -101,6 +105,7 @@ steps:
- setup_macos_executor:
node_version: <<parameters.node_version>>
homebrew_cache: <<parameters.homebrew_cache>>
homebrew_update: <<parameters.homebrew_update>>
- ios_simulator_start:
device: <<parameters.device>>
- yarn_install:
Expand Down

0 comments on commit 6a7d635

Please sign in to comment.