Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release macOS builds #26

Merged
merged 1 commit into from
Nov 21, 2024
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
8 changes: 8 additions & 0 deletions .changesets/release-macos-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
bump: patch
type: add
---

Release macOS builds for Apple Silicon (arm64) and Intel (x86_64).

Using these builds is discouraged in production environments.
2 changes: 2 additions & 0 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
'release/x86_64-unknown-linux-musl.tar.gz#Linux (x86_64, musl)' \
'release/aarch64-unknown-linux-gnu.tar.gz#Linux (arm64)' \
'release/aarch64-unknown-linux-musl.tar.gz#Linux (arm64, musl)' \
'release/x86_64-apple-darwin.tar.gz#macOS (x86_64)' \
'release/aarch64-apple-darwin.tar.gz#macOS (arm64)' \
'release/install.sh#Installer script'
env:
GH_TOKEN: ${{github.token}}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ curl -sSL https://github.com/appsignal/appsignal-wrap/releases/latest/download/i

You'll need to run it with super-user privileges -- if you're not running this as root, prefix it with `sudo`.

Currently, `appsignal-wrap` is only supported for Linux, in the x86_64 and ARM64 architectures. Linux distributions based on musl, such as Alpine, are also supported.
`appsignal-wrap` is only supported for Linux and macOS, in the x86_64 (Intel) and arm64 (Apple Silicon) architectures. Linux distributions based on musl, such as Alpine, are also supported.

Not a fan of `curl | sh` one-liners? Download the binary for your operating system and architecture [from our latest release](https://github.com/appsignal/appsignal-wrap/releases/latest/).

Expand Down
23 changes: 13 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if ! command -v tar >/dev/null; then
exit 1
fi

# This value is automatically updated during the release process;
# see `script/write_version`.
LAST_RELEASE="0.2.0"

VERSION="${APPSIGNAL_WRAP_VERSION:-"$LAST_RELEASE"}"
Expand All @@ -20,25 +22,21 @@ INSTALL_FOLDER="${APPSIGNAL_WRAP_INSTALL_FOLDER:-"/usr/local/bin"}"
# Expected values are "linux" or "darwin".
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"

if [ "$OS" != "linux" ]; then
echo "Error: Unsupported OS: $OS"
exit 1
fi

if [ "$OS" = "linux" ]; then
OS_FRIENDLY="Linux"
VENDOR="unknown"
elif [ "$OS" = "darwin" ]; then
OS_FRIENDLY="macOS"
VENDOR="apple"
else
echo "Error: Unsupported OS: $OS"
exit 1
fi

# Expected values are "x86_64", "aarch64" or "arm64".
ARCH="$(uname -m)"
ARCH_FRIENDLY="$ARCH"

if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "arm64" ] && [ "$ARCH" != "aarch64" ]; then
echo "Error: Unsupported architecture: $ARCH"
exit 1
fi

# Rename "arm64" to "aarch64" to match the naming convention used by the Rust
# toolchain target triples.
if [ "$ARCH" = "arm64" ]; then
Expand All @@ -50,6 +48,11 @@ if [ "$ARCH" = "aarch64" ]; then
ARCH_FRIENDLY="arm64"
fi

if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then
echo "Error: Unsupported architecture: $ARCH"
exit 1
fi

EXTRA=""
EXTRA_FRIENDLY=""

Expand Down
2 changes: 2 additions & 0 deletions script/build_artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

rm -rf release

script/build_artifact x86_64-apple-darwin
script/build_artifact x86_64-unknown-linux-gnu
script/build_artifact x86_64-unknown-linux-musl
script/build_artifact aarch64-apple-darwin
script/build_artifact aarch64-unknown-linux-gnu
script/build_artifact aarch64-unknown-linux-musl

Expand Down