5if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
6 echo "Missing required env var: BINARY=X VERSION=X $(basename $0)"
10# Check for Go version 1.14.*
11GO_VERSION=$(go version | awk '{print $3}')
12if [[ ! "${GO_VERSION}" =~ ^go1.14.* ]]; then
13 echo "Go version must be >= go1.14"
17ARCHS=(darwin-amd64 linux-amd64 linux-arm64 linux-armv6 freebsd-amd64 windows-amd64)
21# Create architecture specific release dirs
22for ARCH in "${ARCHS[@]}"; do
23 mkdir -p release/${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}
25 GO_OS=$(echo $ARCH | awk -F- '{print $1}')
26 GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
28 # Create architecture specific binaries
29 if [[ ${GO_ARCH} == "armv6" ]]; then
30 GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
31 -o release/${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}/${BINARY} github.com/pusher/oauth2_proxy
33 GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
34 -o release/${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}/${BINARY} github.com/pusher/oauth2_proxy
39 # Create sha256sum for architecture specific binary
40 sha256sum ${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}/${BINARY} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
42 # Create tar file for architecture specific binary
43 tar -czvf ${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}.tar.gz ${BINARY}-${VERSION}.${ARCH}.${GO_VERSION}
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