[build] Add support for static server builds
This commit is contained in:
parent
3d1694bbd1
commit
2c2bd911e1
1 changed files with 3 additions and 1 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue