[build] Add support for static server builds

This commit is contained in:
Ciprian Dorin Craciun 2019-08-12 00:27:10 +03:00
parent 3d1694bbd1
commit 2c2bd911e1

View file

@ -44,10 +44,12 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
export -- CGO_ENABLED=0
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
-ldflags 'all=-s' \
-tags netgo \
-ldflags 'all=-s -extld gcc -extldflags "-static"' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-server" \
-- ./cmd/server.go \