fix: wrong architecture label in aarch64 .deb packages (#3209)

This commit is contained in:
三咲雅 misaki masa 2025-09-26 18:45:59 +08:00 committed by sxyazi
parent 51635996e0
commit 25d5554a9a
No known key found for this signature in database

View file

@ -8,20 +8,16 @@ export YAZI_GEN_COMPLETIONS=1
git config --global --add safe.directory "*"
cargo build --release --locked --target "$1"
# Use a consistent target directory
rm -rf target/release
mv "target/$1/release" target/release
# Package deb
if [[ "$ARTIFACT_NAME" == *-linux-* ]] && { [[ "$ARTIFACT_NAME" == *-aarch64-* ]] || [[ "$ARTIFACT_NAME" == *-x86_64-* ]]; }; then
cargo install cargo-deb
cargo deb -p yazi-packing --no-build -o "$ARTIFACT_NAME.deb"
cargo deb -p yazi-packing --no-build --target "$1" -o "$ARTIFACT_NAME.deb"
fi
# Create the artifact
mkdir -p "$ARTIFACT_NAME/completions"
cp "target/release/ya" "$ARTIFACT_NAME"
cp "target/release/yazi" "$ARTIFACT_NAME"
cp "target/$1/release/ya" "$ARTIFACT_NAME"
cp "target/$1/release/yazi" "$ARTIFACT_NAME"
cp yazi-cli/completions/* "$ARTIFACT_NAME/completions"
cp yazi-boot/completions/* "$ARTIFACT_NAME/completions"
cp README.md LICENSE "$ARTIFACT_NAME"