1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-07-15 01:44:22 +02:00

Added arch types to Docker and binary releases (#2220)

* Added several arm builds to dist.sh

* Added platforms to Dockerfile and updated docs

* Reverted changes made for testing

* Fix docker platform images

* Fix docker platform images

* Update Makefile

Co-authored-by: Jan Larwig <jan@larwig.com>

* Update Makefile

Co-authored-by: Jan Larwig <jan@larwig.com>

* Update Makefile

Co-authored-by: Jan Larwig <jan@larwig.com>

* Formatting improvements

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Koen van Zuijlen
2023-09-08 18:18:20 +02:00
committed by GitHub
parent f3269b3f26
commit 982ae7e9d2
6 changed files with 37 additions and 32 deletions

18
dist.sh
View File

@ -7,7 +7,18 @@ if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
exit 1
fi
ARCHS=(darwin-amd64 linux-amd64 linux-arm64 linux-ppc64le linux-armv6 freebsd-amd64 windows-amd64)
ARCHS=(
darwin-amd64
darwin-arm64
linux-amd64
linux-arm64
linux-armv5
linux-armv6
linux-armv7
linux-ppc64le
freebsd-amd64
windows-amd64
)
mkdir -p release
@ -19,8 +30,9 @@ for ARCH in "${ARCHS[@]}"; do
GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
# Create architecture specific binaries
if [[ ${GO_ARCH} == "armv6" ]]; then
GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
if [[ ${GO_ARCH} == armv* ]]; then
GO_ARM=$(echo $GO_ARCH | awk -Fv '{print $2}')
GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=${GO_ARM} CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
else
GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \