feat: update build script to use CGO_ENABLED variable for building
This commit is contained in:
@@ -6,9 +6,9 @@ ENTRYPOINT="${ENTRYPOINT:-./main.go}"
|
||||
LDFLAGS="${LDFLAGS:--w -s}"
|
||||
GOOS="${GOOS:-linux}"
|
||||
|
||||
echo "=> Building ${BINARY} (CGO_ENABLED=0 GOOS=${GOOS})"
|
||||
echo "=> Building ${BINARY} (CGO_ENABLED=${CGO_ENABLED:-1} GOOS=${GOOS})"
|
||||
|
||||
CGO_ENABLED=0 GOOS="${GOOS}" go build \
|
||||
CGO_ENABLED="${CGO_ENABLED:-1}" GOOS="${GOOS}" go build \
|
||||
-ldflags="${LDFLAGS}" \
|
||||
-o "${BINARY}" \
|
||||
"${ENTRYPOINT}"
|
||||
|
||||
Reference in New Issue
Block a user