build: make binaries smaller with -s and -w ldflags (#3125)
This commit is contained in:
parent
fd72de211c
commit
9962f0c3f0
2
Makefile
2
Makefile
@ -217,7 +217,7 @@ binary:
|
||||
-e GOOS=${GOOS} -e GOARCH=${GOARCH} -e GOARM=6 -e CGO_ENABLED=1 \
|
||||
-v /tmp/go-cache:/tmp/.cache/go-build -v /tmp/go-pkg:/go/pkg \
|
||||
-w /go/src/storj.io/storj -e GOPROXY -u $(shell id -u):$(shell id -g) storjlabs/golang:${GO_VERSION} \
|
||||
scripts/release.sh build -o release/${TAG}/$(COMPONENT)_${GOOS}_${GOARCH}${FILEEXT} \
|
||||
scripts/release.sh build -ldflags "-s -w" -o release/${TAG}/$(COMPONENT)_${GOOS}_${GOARCH}${FILEEXT} \
|
||||
storj.io/storj/cmd/${COMPONENT}
|
||||
chmod 755 release/${TAG}/$(COMPONENT)_${GOOS}_${GOARCH}${FILEEXT}
|
||||
[ "${FILEEXT}" = ".exe" ] && storj-sign release/${TAG}/$(COMPONENT)_${GOOS}_${GOARCH}${FILEEXT} || echo "Skipping signing"
|
||||
|
Loading…
Reference in New Issue
Block a user