This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/build
2016-03-02 12:41:24 -08:00

19 lines
598 B
Bash
Executable file

#!/bin/bash -e
source ./env
CMDS=( "dex-worker" "dexctl" "dex-overlord" "gendoc")
FORMAT='{{ range $i, $dep := .Deps }}{{ $dep }} {{ end }}'
for CMD in ${CMDS[@]}; do
TARGET="github.com/coreos/dex/cmd/$CMD"
# Install command dependencies. This caches package builds and speeds
# up successive builds a lot.
go list -f="$FORMAT" $TARGET | xargs go install -ldflags="$LD_FLAGS"
# Build the actual command.
go build -o="bin/$CMD" -ldflags="$LD_FLAGS" $TARGET
done
go build -o bin/example-app github.com/coreos/dex/examples/app
go build -o bin/example-cli github.com/coreos/dex/examples/cli