forked from mystiq/dex
schema: fix generator script to work with vendor directory
This commit is contained in:
parent
7416929455
commit
ab4cbe7219
1 changed files with 10 additions and 3 deletions
|
@ -33,8 +33,15 @@ fi
|
|||
|
||||
$GENDOC --f $IN --o $DOC
|
||||
|
||||
# See schema/generator_import.go for instructions on updating the dependency
|
||||
PKG="google.golang.org/api/google-api-go-generator"
|
||||
# Though google-api-go-generator is a main, dex vendors the app using the same
|
||||
# tool it uses to vendor third party packages. Hence, it can be found in the
|
||||
# "vendor" directory.
|
||||
#
|
||||
# This vendoring is currently done with godep, but may change if/when we move to
|
||||
# another tool.
|
||||
#
|
||||
# See schema/generator_import.go for instructions on updating the dependency.
|
||||
PKG="github.com/coreos/dex/vendor/google.golang.org/api/google-api-go-generator"
|
||||
|
||||
# First, write the discovery document into a go file so it can be served statically by the API
|
||||
cat << EOF > "${OUT}"
|
||||
|
@ -53,7 +60,7 @@ echo -n '`' >> "${OUT}"
|
|||
# Now build google-api-go-generator - we vendor so this is consistently reproducible
|
||||
GEN_PATH="bin/google-api-go-generator"
|
||||
if [ ! -f ${GEN_PATH} ]; then
|
||||
GOPATH="${PWD}/Godeps/_workspace" go build -o ${GEN_PATH} ${PKG}
|
||||
go build -o ${GEN_PATH} ${PKG}
|
||||
fi
|
||||
|
||||
# Build the bindings
|
||||
|
|
Loading…
Reference in a new issue