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 1
1
OS = darwin freebsd linux openbsd
2
2
ARCHS = 386 arm amd64 arm64
3
+ LDFLAGS =
3
4
4
5
.DEFAULT_GOAL := help
5
6
10
11
all : build release release-windows
11
12
12
13
build : deps # # Build the project
13
- go build
14
+ go build -ldflags= " $( LDFLAGS ) "
14
15
15
16
release : clean deps # # Generate releases for unix systems
16
17
@for arch in $(ARCHS ) ; \
@@ -19,7 +20,7 @@ release: clean deps ## Generate releases for unix systems
19
20
do \
20
21
echo " Building $$ os-$$ arch" ; \
21
22
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; \
23
24
tar cz -C build -f build/webhook-$$ os-$$ arch.tar.gz webhook-$$ os-$$ arch; \
24
25
done \
25
26
done
@@ -29,7 +30,7 @@ release-windows: clean deps ## Generate release for windows
29
30
do \
30
31
echo " Building windows-$$ arch" ; \
31
32
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; \
33
34
tar cz -C build -f build/webhook-windows-$$ arch.tar.gz webhook-windows-$$ arch; \
34
35
done
35
36
You can’t perform that action at this time.
0 commit comments