5if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
6 echo "Missing required env var: BINARY=X VERSION=X $(basename $0)"
26# Create architecture specific release dirs
27for ARCH in "${ARCHS[@]}"; do
28 mkdir -p release/${BINARY}-${VERSION}.${ARCH}
30 GO_OS=$(echo $ARCH | awk -F- '{print $1}')
31 GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
33 # Determine binary name based on OS
34 if [[ "${GO_OS}" == "windows" ]]; then
35 BINARY_NAME="${BINARY}.exe"
37 BINARY_NAME="${BINARY}"
40 # Create architecture specific binaries
41 if [[ ${GO_ARCH} == armv* ]]; then
42 GO_ARM=$(echo $GO_ARCH | awk -Fv '{print $2}')
43 GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=${GO_ARM} CGO_ENABLED=0 go build \
44 -ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
45 -o release/${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} .
47 GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build \
48 -ldflags="-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=${VERSION}" \
49 -o release/${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} .
54 # Create tar file for architecture specific binary
55 tar -czvf ${BINARY}-${VERSION}.${ARCH}.tar.gz ${BINARY}-${VERSION}.${ARCH}
57 # Create sha256sum for architecture-specific tar
58 sha256sum ${BINARY}-${VERSION}.${ARCH}.tar.gz > ${BINARY}-${VERSION}.${ARCH}.tar.gz-sha256sum.txt
60 # Create sha256sum for architecture specific binary
61 sha256sum ${BINARY}-${VERSION}.${ARCH}/${BINARY_NAME} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list