Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/android-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ jobs:

- name: Install Maestro
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
install_args: maestro

- name: Install Anvil
uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ios-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:

- name: Install Maestro
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
install_args: maestro

- name: Install Anvil
uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@

### Prerequisites

1. Install nvm: https://github.com/creationix/nvm
2. Install the required Node.js version: `nvm install`
3. Install Ruby (version specified in `.ruby-version`). macOS system Ruby is
too old and will not work. Use a version manager such as
[rbenv](https://github.com/rbenv/rbenv) or [rvm](https://rvm.io/).
4. Enable yarn: `corepack enable`

**Note:** On future terminal sessions, run `nvm use` to activate the correct
Node.js version. Alternatively, set up
[automatic nvm switching](https://github.com/nvm-sh/nvm#deeper-shell-integration)
in your shell.
1. Install [mise](https://mise.jdx.dev): `curl https://mise.run | sh`. See the
[installation docs](https://mise.jdx.dev/getting-started.html) for shell
activation (required so tool versions auto-switch when you `cd` into the repo).
2. From the repo root: `mise install`. This installs all pinned tools.
3. Enable yarn: `corepack enable`

### Internal developers

Expand Down Expand Up @@ -119,7 +113,7 @@ patched by the postinstall script from `GOOGLE_SERVICE_API_KEY` in your `.env`.
open -a "Android Studio" # macOS
```
Always launch Android Studio this way so it inherits your shell PATH
(including `node` from nvm). Launching from Spotlight or the Dock will
(including `node` from mise). Launching from Spotlight or the Dock will
cause Gradle sync to fail with "Cannot run program node".

## Developing
Expand Down
30 changes: 29 additions & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,35 @@ workflows:
build_setup:
steps:
- git-clone@8.1: {}
- nvm@1: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

# Install mise from a pinned, checksum-verified release artifact instead of
# piping https://mise.run into a shell. The Bitrise jobs hold signing credentials,
# so we don't want to execute arbitrary scripts served by a mutable endpoint.
MISE_VERSION="v2026.7.7"
# sha256 of mise-${MISE_VERSION}-macos-arm64.tar.gz from the release's SHASUMS256.txt
MISE_SHA256="df490dc2fff51c82bf0f64e1fcd0265b145ce80d2d15ce99b95f2adf0b1fe82c"

curl -fsSL "https://github.com/jdx/mise/releases/download/${MISE_VERSION}/mise-${MISE_VERSION}-macos-arm64.tar.gz" -o /tmp/mise.tar.gz
echo "${MISE_SHA256} /tmp/mise.tar.gz" | shasum -a 256 -c -
tar -xzf /tmp/mise.tar.gz -C /tmp
mkdir -p "$HOME/.local/bin"
mv /tmp/mise/bin/mise "$HOME/.local/bin/mise"

export PATH="$HOME/.local/bin:$PATH"
mise trust
mise install node

# Expose mise and its shims (node etc.) to all subsequent steps
envman add --key PATH --value "$HOME/.local/share/mise/shims:$PATH"
title: Install Node via mise
- script@1:
inputs:
- content: |-
Expand Down
7 changes: 2 additions & 5 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

### Setup

The Maestro version used by this repo is pinned in `.tool-versions` at the repo root. Both CI and local installs read from that file.
The Maestro version used by this repo is pinned via mise. See the [repo README](../README.md#prerequisites) for the full setup. Both CI and local installs use the same pin.

1. Install [mise](https://mise.jdx.dev): `curl https://mise.run | sh` (or via your package manager). See the [installation docs](https://mise.jdx.dev/getting-started.html) for shell activation.
2. From the repo root: `mise install` -- installs the pinned Maestro version (and any other tools added to `.tool-versions` over time).

To upgrade Maestro across the team, update the version in `.tool-versions` and open a PR. CI uses the same file, so everyone stays in sync.
To upgrade Maestro across the team, update the version in `mise.toml`.

### Run tests locally

Expand Down
41 changes: 13 additions & 28 deletions ios/.xcode.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
# running script phases inside Xcode. For local-only overrides, create an
# `.xcode.env.local` (gitignored) -- it is sourced after this file and wins.
#
# NODE_BINARY must point at the Node version this project pins (.node-version /
# .nvmrc) so Xcode GUI builds use the same Node as the CLI and CI.
# NODE_BINARY must point at the Node version this project pins (.node-version)
# so Xcode GUI builds use the same Node as the CLI and CI.
#
# Why this logic exists: Xcode runs build phases in a minimal, non-login shell
# that does NOT load your shell rc files, so version managers (mise/nvm) aren't
# auto-activated and a bare `command -v node` can resolve to the wrong Node
# (e.g. a Homebrew install) or none at all. We probe known version managers
# first, then fall back to whatever `node` is on PATH, e.g. in CI where node is
# usually on the path.
# that does NOT load your shell rc files, so mise isn't auto-activated and a
# bare `command -v node` can resolve to the wrong Node (e.g. a Homebrew
# install) or none at all. We probe mise first, then fall back to whatever
# `node` is on PATH, e.g. in CI where node is usually on the path.

__resolve_node_binary() {
local mise_bin resolved nvm_sh
local mise_bin resolved

# 1) mise -- resolves Node from the repo's mise config (mise.toml/.tool-versions),
# or from .node-version/.nvmrc only when idiomatic version files are enabled.
# Probe absolute paths too, since mise is often not on Xcode's stripped PATH:
# the official curl installer lands in ~/.local/bin, Homebrew in /opt/homebrew
# (Apple Silicon) or /usr/local (Intel).
# 1) mise -- resolves Node from the repo pin (.node-version, read via the
# idiomatic version file setting in mise.toml). Probe absolute paths too,
# since mise is often not on Xcode's stripped PATH: the official curl
# installer lands in ~/.local/bin, Homebrew in /opt/homebrew (Apple Silicon)
# or /usr/local (Intel).
for mise_bin in \
"$(command -v mise 2>/dev/null)" \
"$HOME/.local/bin/mise" \
Expand All @@ -31,21 +30,7 @@ __resolve_node_binary() {
fi
done

# 2) nvm -- source it and honor .nvmrc when present. Probe absolute Homebrew
# paths too, since `brew` itself may not be on Xcode's stripped PATH.
for nvm_sh in \
"$HOME/.nvm/nvm.sh" \
/opt/homebrew/opt/nvm/nvm.sh \
/usr/local/opt/nvm/nvm.sh \
"$(brew --prefix nvm 2>/dev/null)/nvm.sh"; do
if [ -s "$nvm_sh" ]; then
. "$nvm_sh" --no-use
nvm use >/dev/null 2>&1 || nvm use default >/dev/null 2>&1
break
fi
done

# 3) fall back to whatever Node is on PATH (correct in CI and plain installs).
# 2) fall back to whatever Node is on PATH (correct in CI and plain installs).
# `|| true` keeps an empty result from aborting `set -e` consumers (e.g.
# expo-configure-project.sh) before they reach their own node-not-found path.
command -v node 2>/dev/null || true
Expand Down
8 changes: 8 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[tools]
maestro = "cli-2.0.10"
Comment thread
olerass marked this conversation as resolved.

[settings]
# Node and Ruby stay pinned in .node-version/.ruby-version so actions/setup-node
# and ruby/setup-ruby can read them. Node can fold into [tools] once
# https://github.com/actions/setup-node/pull/1421 ships.
idiomatic_version_file_enable_tools = ["node", "ruby"]
Loading