diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88027ab..fd8e4ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,13 +21,18 @@ jobs: strategy: fail-fast: false # don't fail other jobs if one fails matrix: - build: [x86_64-linux, aarch64-linux, aarch64-macos] + build: [x86_64-linux, x86_64-musl, aarch64-linux, aarch64-macos] include: - build: x86_64-linux os: ubuntu-latest rust: stable target: x86_64-unknown-linux-gnu cross: false + - build: x86_64-musl + os: ubuntu-latest + rust: stable + target: x86_64-unknown-linux-musl + cross: true - build: aarch64-linux os: ubuntu-latest rust: stable diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index e0af0e9..577d0a1 --- a/install.sh +++ b/install.sh @@ -1,7 +1,9 @@ -#!/usr/bin/env zsh - +#!/usr/bin/zsh set -e +WORKDIR="$(pwd)" + + ARCH="$(uname -m)" case "$ARCH" in x86_64) ARCH_ID="x86_64-linux" ;; @@ -20,14 +22,18 @@ if [[ -z "$LATEST_VERSION" ]]; then echo "❌ Could not determine the latest version" && exit 1 fi -FILENAME="rushstr-${LATEST_VERSION}-${ARCH_ID}.tar.xz" +BASE_NAME="rushstr-${LATEST_VERSION}-${ARCH_ID}" +FILENAME="${BASE_NAME}.tar.xz" URL="https://github.com/donhk/rushstr/releases/download/${LATEST_VERSION}/${FILENAME}" echo "⬇️ Downloading $FILENAME..." curl -LO "$URL" -echo "📦 Extracting..." +pushd $TOOLS_DIR + +echo "📦 Extracting...$TOOLS_DIR/$FILENAME" tar -xf "$FILENAME" +mv "$TOOLS_DIR/$BASE_NAME/rushstr" "$TOOLS_DIR" rm "$FILENAME" # Add to PATH (permanent via ~/.zshrc) @@ -37,6 +43,8 @@ if ! grep -q "$TOOLS_DIR" ~/.zshrc; then echo "🔧 Added rushstr to ~/.zshrc" fi +popd + # Generate shell integration "$TOOLS_DIR/rushstr" --zsh-shell-conf