From b3001a2927e0e06e724b484070fe36500eac0d82 Mon Sep 17 00:00:00 2001 From: killagu Date: Wed, 24 May 2023 16:18:22 +0800 Subject: [PATCH] ci(release): fix macos nydusd rust target Can not use `declare -A` in macos shell. Signed-off-by: killagu --- .github/workflows/release.yml | 7 +++++-- Cargo.lock | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3172121851d..cc1f2b1a3d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,8 +61,11 @@ jobs: key: ${{ runner.os }}-cargo-${{ matrix.arch }} - name: build run: | - declare -A rust_target_map=( ["amd64"]="x86_64-apple-darwin" ["arm64"]="aarch64-apple-darwin") - RUST_TARGET=${rust_target_map[${{ matrix.arch }}]} + if [[ "${{matrix.arch}}" == "amd64" ]]; then + RUST_TARGET="x86_64-apple-darwin" + else + RUST_TARGET="aarch64-apple-darwin" + fi cargo install --version 0.2.4 cross rustup target add ${RUST_TARGET} rustup component add rustfmt clippy diff --git a/Cargo.lock b/Cargo.lock index 0fd734ee1bd..1fd231edbd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -494,9 +494,9 @@ dependencies = [ [[package]] name = "fuse-backend-rs" -version = "0.10.3" +version = "0.10.4" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "58a8f2394690faff745335f120fad1d7d8bd737069690c856c11befa7bca1b18" +checksum = "dc24820b14267bec37fa87f5c2a32b5f1c5405b8c60cc3aa77afd481bd2628a6" dependencies = [ "arc-swap", "bitflags",