wstunnel/.goreleaser_hook.sh
Σrebe - Romain GERARD 0973359ea3 update github action
Former-commit-id: 909a8999745388e1efc6a0087d8f1d2cb339b54f [formerly 9bcc5c7d966659b56d80cab610d687b408b531a3] [formerly 708ea0512cfa490eaa9fafa1f92ea16bdc21cf05 [formerly e05dcfca80571c20cee55718528997e65c8c6110]]
Former-commit-id: 21cec496e03f2289531cc5cb20f3b72b8e5b982e [formerly 24e36e46cb412e2743754908cf01ac6c9f88a5db]
Former-commit-id: cb9af7fe2caffdc2d6c83a14b7c34eb5ef63e2aa
Former-commit-id: 0542a1b9531595d1084c2f70c830d536f84cb0b0
Former-commit-id: 63bb8b12a848a54da8939ab9fcc550de116d77ce
Former-commit-id: d139330add70fde1ad06f12c0076b469f20f12e8 [formerly d68fa5332df916927236e4ebd71db495dce065df]
Former-commit-id: 6add272957a89d43f310f44c70b17ca2cecd927a
2023-10-21 21:01:51 +02:00

27 lines
691 B
Bash
Executable file

#!/usr/bin/env bash
go_arch=$1
go_os=$2
project_name=$3
# Make Go -> Rust arch/os mapping
case $go_arch in
amd64) rust_arch='x86_64' ;;
arm64) rust_arch='aarch64' ;;
arm) rust_arch='armv7' ;;
*) echo "unknown arch: $go_arch" && exit 1 ;;
esac
case $go_os in
linux) rust_os='linux' ;;
darwin) rust_os='apple-darwin' ;;
windows) rust_os='windows' ;;
*) echo "unknown os: $go_os" && exit 1 ;;
esac
# Find artifacts and uncompress in the coresponding directory
DIST_DIR=$(find dist -type d -name "*${go_os}_${go_arch}*")
echo "DIST_DIR: $DIST_DIR"
rm -rf ${DIST_DIR}/*
find artifacts -type f -wholename "*${rust_arch}*${rust_os}*" -exec cp {} ${DIST_DIR} \;