Add macOS x86_64 platform support
Platform detection now happens in framework/platform, sourced by both sync.sh and the node shim. Uses shasum on macOS, sha256sum on Linux. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
26
framework/platform
Normal file
26
framework/platform
Normal file
@@ -0,0 +1,26 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Detect platform (OS and architecture)
|
||||
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
arch=$(uname -m)
|
||||
|
||||
case "$os" in
|
||||
linux) platform_os=linux ;;
|
||||
darwin) platform_os=darwin ;;
|
||||
*) echo "Unsupported OS: $os" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
case "$arch" in
|
||||
x86_64) platform_arch=x86_64 ;;
|
||||
*) echo "Unsupported architecture: $arch" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
platform="${platform_os}_${platform_arch}"
|
||||
|
||||
# Platform-specific checksum command
|
||||
if [ "$platform_os" = "darwin" ]; then
|
||||
sha256_check() { shasum -a 256 -c -; }
|
||||
else
|
||||
sha256_check() { sha256sum -c -; }
|
||||
fi
|
||||
@@ -7,6 +7,15 @@ project_root="$node_common_DIR/../.."
|
||||
# shellcheck source=../versions
|
||||
source "$node_common_DIR"/../versions
|
||||
|
||||
# shellcheck source=../platform
|
||||
source "$node_common_DIR"/../platform
|
||||
|
||||
# Get platform-specific node directory
|
||||
nodejs_dirname_var="nodejs_dirname_${platform}"
|
||||
nodejs_dirname="${!nodejs_dirname_var}"
|
||||
nodejs_dist_dir="framework/binaries/$nodejs_dirname"
|
||||
nodejs_bin_dir="$nodejs_dist_dir/bin"
|
||||
|
||||
nodejs_binary_dir="$project_root/$nodejs_bin_dir"
|
||||
|
||||
# This might be too restrictive. Or not restrictive enough.
|
||||
|
||||
@@ -2,18 +2,25 @@
|
||||
|
||||
# This file belongs to the framework. You are not expected to modify it.
|
||||
|
||||
nodejs_version=v24.12.0
|
||||
|
||||
# https://nodejs.org/dist
|
||||
nodejs_binary_linux_x86_64=https://nodejs.org/dist/v24.12.0/node-v24.12.0-linux-x64.tar.xz
|
||||
nodejs_checksum_linux_x86_64=bdebee276e58d0ef5448f3d5ac12c67daa963dd5e0a9bb621a53d1cefbc852fd
|
||||
nodejs_dist_dir=framework/binaries/node-v22.15.1-linux-x64
|
||||
nodejs_bin_dir="$nodejs_dist_dir/bin"
|
||||
nodejs_dirname_linux_x86_64=node-v24.12.0-linux-x64
|
||||
|
||||
nodejs_binary_darwin_x86_64=https://nodejs.org/dist/v24.12.0/node-v24.12.0-darwin-x64.tar.xz
|
||||
nodejs_checksum_darwin_x86_64=1e4d54f706e0a3613d6415ffe2ccdfd4095d3483971dbbaa4ff909fac5fc211c
|
||||
nodejs_dirname_darwin_x86_64=node-v24.12.0-darwin-x64
|
||||
|
||||
caddy_binary_linux_x86_64=fixme
|
||||
caddy_checksum_linux_x86_64=fixmetoo
|
||||
|
||||
# https://github.com/pnpm/pnpm/releases
|
||||
pnpm_binary_linux_x86_64=https://github.com/pnpm/pnpm/releases/download/v10.28.0/pnpm-linux-x64
|
||||
pnpm_checksum_linux_x86_64=sha256:348e863d17a62411a65f900e8d91395acabae9e9237653ccc3c36cb385965f28
|
||||
pnpm_checksum_linux_x86_64=348e863d17a62411a65f900e8d91395acabae9e9237653ccc3c36cb385965f28
|
||||
|
||||
pnpm_binary_darwin_x86_64=https://github.com/pnpm/pnpm/releases/download/v10.28.0/pnpm-macos-x64
|
||||
pnpm_checksum_darwin_x86_64=99431e91d721169c2050d5e46abefc6f0d23c49e635a5964dcb573d9fe89975a
|
||||
|
||||
golangci_lint=v2.7.2-alpine
|
||||
Reference in New Issue
Block a user