From 2f72f7671ed1534db95ac2964fba2afd3a61af86 Mon Sep 17 00:00:00 2001 From: Teo Stocco Date: Thu, 31 Oct 2024 14:50:15 +0300 Subject: [PATCH] feat: upgrade and aarch64 musl support (#93) * feat: upgrade and aarch64 musl support * Committing WIP for git town undo * feat: bump --- .github/workflows/release.yml | 3 +++ Cargo.toml | 30 ++++++++++----------- installer.sh | 51 ++++++++++++++++++++++++----------- lade.yml | 3 +++ sdk/Cargo.toml | 6 ++--- src/shell.rs | 2 +- 6 files changed, 60 insertions(+), 35 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e38091..e3d7c06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,9 @@ jobs: - os: ubuntu-latest target: aarch64-unknown-linux-gnu suffix: "" + - os: ubuntu-latest + target: aarch64-unknown-linux-musl + suffix: "" - os: windows-latest target: x86_64-pc-windows-msvc suffix: ".exe" diff --git a/Cargo.toml b/Cargo.toml index 919ae33..6aaefd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,14 +6,14 @@ resolver = "2" [package] name = "lade" -version = "0.11.4-beta.1" +version = "0.11.4" edition = "2021" description = "Automatically load secrets from your preferred vault as environment variables, and clear them once your shell command is over." license = "MPL-2.0" repository = "https://github.com/zifeo/lade" [dependencies] -anyhow = "1.0.83" +anyhow = "1.0.91" self_update = { version = "0.41.0", features = [ "archive-tar", "archive-zip", @@ -21,28 +21,28 @@ self_update = { version = "0.41.0", features = [ "compression-zip-deflate", "compression-zip-bzip2", ] } -serde = { version = "1.0.201", features = ["derive"] } +serde = { version = "1.0.214", features = ["derive"] } serde_yaml = "0.9.34" -clap = { version = "4.5.4", features = ["derive"] } -regex = "1.10.4" -lade-sdk = { path = "./sdk", version = "0.11.4-beta.1" } +clap = { version = "4.5.20", features = ["derive"] } +regex = "1.11.1" +lade-sdk = { path = "./sdk", version = "0.11.4" } tokio = { version = "1", features = ["full"] } -indexmap = { version = "2.2.6", features = ["serde"] } -clap-verbosity-flag = "2.2.0" -env_logger = "0.11.3" -openssl = { version = "0.10.64", features = ["vendored"] } -serde_json = "1.0.117" -futures = "0.3.30" +indexmap = { version = "2.6.0", features = ["serde"] } +clap-verbosity-flag = "2.2.2" +env_logger = "0.11.5" +openssl = { version = "0.10.68", features = ["vendored"] } +serde_json = "1.0.132" +futures = "0.3.31" path-clean = "1.0.1" directories = "5.0.1" chrono = { version = "0.4.38", features = ["serde"] } -log = "0.4.21" +log = "0.4.22" semver = "1.0.23" -sysinfo = "0.30.12" +sysinfo = "0.32.0" textwrap = "0.16.1" [target.'cfg(target_family = "unix")'.dependencies] nix = { version = "0.29.0", features = ["signal"] } [dev-dependencies] -assert_cmd = "2.0.14" +assert_cmd = "2.0.16" diff --git a/installer.sh b/installer.sh index e6efdea..8746d77 100755 --- a/installer.sh +++ b/installer.sh @@ -20,25 +20,43 @@ OUT_DIR="${OUT_DIR:-/usr/local/bin}" VERSION="${VERSION:-$LATEST_VERSION}" MACHINE=$(uname -m) +if ldd --version 2>&1 | grep -q musl; then + LIBC="musl" +else + LIBC="gnu" +fi + if [ "${PLATFORM:-x}" = "x" ]; then case "$(uname -s | tr '[:upper:]' '[:lower:]')" in - "linux") - case "$MACHINE" in - "arm64"* | "aarch64"* ) PLATFORM='aarch64-unknown-linux-gnu' ;; - *"64") PLATFORM='x86_64-unknown-linux-gnu' ;; - esac - ;; - "darwin") - case "$MACHINE" in - "arm64"* | "aarch64"* ) PLATFORM='aarch64-apple-darwin' ;; - *"64") PLATFORM='x86_64-apple-darwin' ;; - esac + "linux") + case "$MACHINE" in + "arm64"* | "aarch64"*) + if [ "$LIBC" = "musl" ]; then + PLATFORM='aarch64-unknown-linux-musl' + else + PLATFORM='aarch64-unknown-linux-gnu' + fi ;; - "msys"*|"cygwin"*|"mingw"*|*"_nt"*|"win"*) - case "$MACHINE" in - *"64") PLATFORM='x86_64-pc-windows-msvc' ;; - esac + *"64") + if [ "$LIBC" = "musl" ]; then + PLATFORM='x86_64-unknown-linux-musl' + else + PLATFORM='x86_64-unknown-linux-gnu' + fi ;; + esac + ;; + "darwin") + case "$MACHINE" in + "arm64"* | "aarch64"*) PLATFORM='aarch64-apple-darwin' ;; + *"64") PLATFORM='x86_64-apple-darwin' ;; + esac + ;; + "msys"* | "cygwin"* | "mingw"* | *"_nt"* | "win"*) + case "$MACHINE" in + *"64") PLATFORM='x86_64-pc-windows-msvc' ;; + esac + ;; esac if [ "${PLATFORM:-x}" = "x" ]; then cat >&2 <