From 22b6127bf2a6801483a3d774eb51cf93a6a0a563 Mon Sep 17 00:00:00 2001 From: Seednode Date: Sun, 23 Oct 2022 16:49:32 -0500 Subject: [PATCH] Re-enabled Windows builds --- build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1271548..382933d 100755 --- a/build.sh +++ b/build.sh @@ -10,6 +10,8 @@ platforms=( "linux/amd64" "linux/arm" "linux/arm64" + "windows/386" + "windows/amd64" ) for platform in "${platforms[@]}"; do @@ -18,7 +20,9 @@ for platform in "${platforms[@]}"; do GOARCH="${platform_split[1]}" output_name="${package_name}-${GOOS}-${GOARCH}" ld_flags='-s -w' - if [ "${GOOS}" == "linux" ] && [ "${GOARCH}" == "amd64" ]; then + if [ "${GOOS}" == "windows" ]; then + output_name+=".exe" + elif [ "${GOOS}" == "linux" ] && [ "${GOARCH}" == "amd64" ]; then ld_flags+=' -linkmode external -extldflags "-static"' fi env GOOS="${GOOS}" GOARCH="${GOARCH}" CC="musl-gcc" go build -ldflags "${ld_flags}" -o "builds/${output_name}"