You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
381 B
Bash
18 lines
381 B
Bash
2 months ago
|
#!/bin/bash
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
POSSIBLE_GOOS=( "windows" "linux" "darwin" )
|
||
|
POSSIBLE_GOARCH=( "amd64" "arm64" )
|
||
|
|
||
|
for OS in "${POSSIBLE_GOOS[@]}"; do
|
||
|
for ARCH in "${POSSIBLE_GOARCH[@]}"; do
|
||
|
FOLDER_NAME="ccat-$OS-$ARCH"
|
||
|
mkdir "${FOLDER_NAME}"
|
||
|
GOOS=$OS GOARCH=$ARCH go build -o "${FOLDER_NAME}/"
|
||
|
zip -r "${FOLDER_NAME}" "${FOLDER_NAME}"
|
||
|
rm -r "${FOLDER_NAME}"
|
||
|
done
|
||
|
done
|
||
|
|