From f8cb03bf880d69e9304e9b301190452cd8f6c4e4 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Thu, 15 Aug 2024 12:28:12 -0500 Subject: [PATCH] Wrote script to create release builds --- create_release_builds.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 create_release_builds.sh diff --git a/create_release_builds.sh b/create_release_builds.sh new file mode 100755 index 0000000..cd4e38d --- /dev/null +++ b/create_release_builds.sh @@ -0,0 +1,17 @@ +#!/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 +