Skip to content

Commit

Permalink
standalone-installer-unix: Use new macOS on aarch64 builds
Browse files Browse the repository at this point in the history
For merge to master after the first release with aarch64 builds
available.¹

¹ <#357>
  • Loading branch information
tsibley committed Feb 1, 2024
1 parent 70c88db commit 7ea390a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ development source code and as such may not be routinely kept up to date.
## Improvements

* We now produce standalone installation archives for macOS running on aarch64
hardware (aka arm64, Apple Silicon, M1/M2).
([#357](https://github.com/nextstrain/cli/pull/357))
hardware (aka arm64, Apple Silicon, M1/M2). The standalone installer will
use these archives starting with this release. Rosetta 2 is still required
to be enabled at install time, as it's still needed by Nextstrain's Conda and
Docker runtimes. This requirement may be relaxed in the future since not all
Nextstrain CLI commands use a runtime.
([#357](https://github.com/nextstrain/cli/pull/357),
[#358](https://github.com/nextstrain/cli/pull/358))


# 8.0.1 (29 January 2024)
Expand Down
23 changes: 21 additions & 2 deletions bin/standalone-installer-unix
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,28 @@ target-triple() {
;;

Darwin)
[[ "$machine" == x86_64 || "$machine" == arm64 ]] || die "unsupported architecture: $machine"
# XXX TODO: Move this check for Rosetta closer to the places that
# require it. With standalone builds for aarch64 now, Rosetta 2 is
# technically not needed for Nextstrain CLI itself anymore. The
# Conda runtime still requires it and I believe the Docker runtime
# does too. But someone could use non-runtime CLI commands (e.g.
# `nextstrain remote`) without Rosetta.
# -trs, 1 Feb 2024
[[ "$machine" != arm64 ]] || pgrep -qU _oahd 2>/dev/null || die "Rosetta 2 not enabled. Please run:"$'\n\n'" softwareupdate --install-rosetta"$'\n\n'"and then retry this installation of Nextstrain CLI."
machine=x86_64

# XXX TODO: Consider checking VERSION here so we only use aarch64
# builds _after_ the first release in which they're supported? As
# it stands now, if you want to install an older version and are on
# aarch64 hardware it will fail as the builds don't exist. The
# workaround is to set TARGET=x86_64-apple-darwin when running the
# installer. This probably doesn't affect many people (mostly
# devs?) so I'm opting to skip it for now.
# -trs, 1 Feb 2024
case "$machine" in
x86_64) ;;
arm64) machine=aarch64;;
*) die "unsupported architecture: $machine";;
esac
vendor=apple
os=darwin
;;
Expand Down

0 comments on commit 7ea390a

Please sign in to comment.