From ab4cbe7219017af8f7058e20219e59777feafdf0 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Wed, 6 Apr 2016 11:26:29 -0700 Subject: [PATCH] schema: fix generator script to work with vendor directory --- schema/generator | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/schema/generator b/schema/generator index 54effc73..56c5e5aa 100755 --- a/schema/generator +++ b/schema/generator @@ -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