Commit ab4cbe72 authored by Eric Chiang's avatar Eric Chiang

schema: fix generator script to work with vendor directory

parent 74169294
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment