Skip to content

Commit

Permalink
Add .exe suffix to windows binary (#118)
Browse files Browse the repository at this point in the history
Fixes issue #112
  • Loading branch information
andyrzhao authored May 17, 2021
1 parent 56b9491 commit 5b0a501
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ 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 \
-a \
-ldflags "-s -w -extldflags 'static'" \
-installsuffix cgo \
-tags netgo \
-o build/$${GOOS}_$${GOARCH}/${NAME} \
-o build/$${GOOS}_$${GOARCH}/${NAME}$${SUFFIX} \
. ; \
done ; \
done
Expand Down

0 comments on commit 5b0a501

Please sign in to comment.