From 09dd08154324e10b00f5cd1520cc4c73582d36a2 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Wed, 27 Aug 2014 20:35:27 -0700 Subject: [PATCH] Document public KUBE_* environment variables and export them Add a section for environment variables in config-go.sh. Document the three public environment variables defined by this script. Make sure the variables get exported so that they can be used by commands spawned by a shell that sourced the config script. Signed-off-by: Filipe Brandenburger --- hack/config-go.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hack/config-go.sh b/hack/config-go.sh index 52d04d1d857..d8c11f3d472 100644 --- a/hack/config-go.sh +++ b/hack/config-go.sh @@ -97,6 +97,12 @@ kube::setup_go_environment() { } +# --- Environment Variables --- + +# KUBE_REPO_ROOT - Path to the top of the build tree. +# KUBE_TARGET - Path where output Go files are saved. +# KUBE_GO_PACKAGE - Full name of the Kubernetes Go package. + KUBE_REPO_ROOT=$(dirname "${BASH_SOURCE:-$0}")/.. if [[ "${OSTYPE:-}" == *darwin* ]]; then # Make the path absolute if it is not. @@ -107,11 +113,15 @@ else # Resolve symlinks. KUBE_REPO_ROOT=$(readlink -f "${KUBE_REPO_ROOT}") fi +export KUBE_REPO_ROOT KUBE_TARGET="${KUBE_REPO_ROOT}/output/go" mkdir -p "${KUBE_TARGET}" +export KUBE_TARGET KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes +export KUBE_GO_PACKAGE + KUBE_GO_PACKAGE_DIR="${KUBE_TARGET}/src/${KUBE_GO_PACKAGE}" KUBE_GO_PACKAGE_BASEDIR=$(dirname "${KUBE_GO_PACKAGE_DIR}")