mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2024-11-24 08:52:25 +02:00
Disable cgo on release builds
Tries to link against libc which isn't present in musl based distributions (such as Alpine Linux). Closes https://github.com/pusher/oauth2_proxy/issues/329
This commit is contained in:
parent
d9362d3bb9
commit
1d808a47d1
4
dist.sh
4
dist.sh
@ -27,10 +27,10 @@ for ARCH in "${ARCHS[@]}"; do
|
||||
|
||||
# Create architecture specific binaries
|
||||
if [[ ${GO_ARCH} == "armv6" ]]; then
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=6 go build -ldflags="-X main.VERSION=${VERSION}" \
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
|
||||
-o release/${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}/${BINARY} github.com/pusher/oauth2_proxy
|
||||
else
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} go build -ldflags="-X main.VERSION=${VERSION}" \
|
||||
GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
|
||||
-o release/${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}/${BINARY} github.com/pusher/oauth2_proxy
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user