2# build binary distributions for linux/amd64 and darwin/amd64
5DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12version=$(cat $DIR/version.go | grep "const VERSION" | awk '{print $NF}' | sed 's/"//g')
13goversion=$(go version | awk '{print $3}')
16echo "... running tests"
19for os in windows linux darwin; do
20 echo "... building v$version for $os/$arch"
22 if [ $os = windows ]; then
25 BUILD=$(mktemp -d ${TMPDIR:-/tmp}/oauth2_proxy.XXXXXX)
26 TARGET="oauth2_proxy-$version.$os-$arch.$goversion"
27 FILENAME="oauth2_proxy-$version.$os-$arch$EXT"
28 GOOS=$os GOARCH=$arch CGO_ENABLED=0 \
29 go build -ldflags="-s -w" -o $BUILD/$TARGET/$FILENAME || exit 1
31 sha256sum+=("$(shasum -a 256 $FILENAME || exit 1)")
32 cd .. && tar czvf $TARGET.tar.gz $TARGET
33 mv $TARGET.tar.gz $DIR/dist
37checksum_file="sha256sum.txt"
39if [ -f $checksum_file ]; then
43for checksum in "${sha256sum[@]}"; do
44 echo "$checksum" >> $checksum_file
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