File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11OS = darwin freebsd linux openbsd
22ARCHS = 386 arm amd64 arm64
3+ LDFLAGS =
34
45.DEFAULT_GOAL := help
56
1011all : build release release-windows
1112
1213build : deps # # Build the project
13- go build
14+ go build -ldflags= " $( LDFLAGS ) "
1415
1516release : clean deps # # Generate releases for unix systems
1617 @for arch in $(ARCHS ) ; \
@@ -19,7 +20,7 @@ release: clean deps ## Generate releases for unix systems
1920 do \
2021 echo " Building $$ os-$$ arch" ; \
2122 mkdir -p build/webhook-$$ os-$$ arch/; \
22- GOOS=$$ os GOARCH=$$ arch go build -o build/webhook-$$ os-$$ arch/webhook; \
23+ GOOS=$$ os GOARCH=$$ arch go build -ldflags= " $( LDFLAGS ) " - o build/webhook-$$ os-$$ arch/webhook; \
2324 tar cz -C build -f build/webhook-$$ os-$$ arch.tar.gz webhook-$$ os-$$ arch; \
2425 done \
2526 done
@@ -29,7 +30,7 @@ release-windows: clean deps ## Generate release for windows
2930 do \
3031 echo " Building windows-$$ arch" ; \
3132 mkdir -p build/webhook-windows-$$ arch/; \
32- GOOS=windows GOARCH=$$ arch go build -o build/webhook-windows-$$ arch/webhook.exe; \
33+ GOOS=windows GOARCH=$$ arch go build -ldflags= " $( LDFLAGS ) " - o build/webhook-windows-$$ arch/webhook.exe; \
3334 tar cz -C build -f build/webhook-windows-$$ arch.tar.gz webhook-windows-$$ arch; \
3435 done
3536
You can’t perform that action at this time.
0 commit comments