From 5b0a501f61187259443bd1376a554823936957d3 Mon Sep 17 00:00:00 2001 From: Andy Zhao Date: Mon, 17 May 2021 16:25:08 -0700 Subject: [PATCH] Add .exe suffix to windows binary (#118) Fixes issue #112 --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b98291a..8cef7857 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,11 @@ export GOFLAGS = -mod=vendor build: @rm -rf build/ @for GOOS in ${GOOSES}; do \ + if [ $${GOOS} = "windows" ]; then \ + SUFFIX=".exe"; \ + else \ + SUFFIX=""; \ + fi ; \ for GOARCH in ${GOARCHES}; do \ echo "Building $${GOOS}/$${GOARCH}" ; \ GOOS=$${GOOS} GOARCH=$${GOARCH} go build \ @@ -31,7 +36,7 @@ build: -ldflags "-s -w -extldflags 'static'" \ -installsuffix cgo \ -tags netgo \ - -o build/$${GOOS}_$${GOARCH}/${NAME} \ + -o build/$${GOOS}_$${GOARCH}/${NAME}$${SUFFIX} \ . ; \ done ; \ done