ci: distribute windows binary with .exe extension (#3332)

* Ensure Windows binary has .exe extension

Signed-off-by: Jan Larwig <jan@larwig.com>

* doc: add changelog for #3332

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Francois Botha 2026-03-14 04:36:24 +02:00 committed by GitHub
parent 5f446c3e00
commit 566b3aac9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 3 deletions

View File

@ -9,6 +9,7 @@
## Changes since v7.14.3
- [#3352](https://github.com/oauth2-proxy/oauth2-proxy/pull/3352) fix: backend logout URL call on sign out (#3172)(@vsejpal)
- [#3332](https://github.com/oauth2-proxy/oauth2-proxy/pull/3332) ci: distribute windows binary with .exe extension (@igitur)
# V7.14.3

13
dist.sh
View File

@ -30,16 +30,23 @@ for ARCH in "${ARCHS[@]}"; do
GO_OS=$(echo $ARCH | awk -F- '{print $1}')
GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
# Determine binary name based on OS
if [[ "${GO_OS}" == "windows" ]]; then
BINARY_NAME="${BINARY}.exe"
else
BINARY_NAME="${BINARY}"
fi
# Create architecture specific binaries
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 github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} .
else
GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build \
-ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
-o release/${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} .
fi
cd release
@ -51,7 +58,7 @@ for ARCH in "${ARCHS[@]}"; do
sha256sum ${BINARY}-${VERSION}.${ARCH}.tar.gz > ${BINARY}-${VERSION}.${ARCH}.tar.gz-sha256sum.txt
# Create sha256sum for architecture specific binary
sha256sum ${BINARY}-${VERSION}.${ARCH}/${BINARY} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
sha256sum ${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
cd ..
done