mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
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 <filbranden@google.com>
This commit is contained in:
parent
dcf9f30592
commit
09dd081543
@ -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}")/..
|
KUBE_REPO_ROOT=$(dirname "${BASH_SOURCE:-$0}")/..
|
||||||
if [[ "${OSTYPE:-}" == *darwin* ]]; then
|
if [[ "${OSTYPE:-}" == *darwin* ]]; then
|
||||||
# Make the path absolute if it is not.
|
# Make the path absolute if it is not.
|
||||||
@ -107,11 +113,15 @@ else
|
|||||||
# Resolve symlinks.
|
# Resolve symlinks.
|
||||||
KUBE_REPO_ROOT=$(readlink -f "${KUBE_REPO_ROOT}")
|
KUBE_REPO_ROOT=$(readlink -f "${KUBE_REPO_ROOT}")
|
||||||
fi
|
fi
|
||||||
|
export KUBE_REPO_ROOT
|
||||||
|
|
||||||
KUBE_TARGET="${KUBE_REPO_ROOT}/output/go"
|
KUBE_TARGET="${KUBE_REPO_ROOT}/output/go"
|
||||||
mkdir -p "${KUBE_TARGET}"
|
mkdir -p "${KUBE_TARGET}"
|
||||||
|
export KUBE_TARGET
|
||||||
|
|
||||||
KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes
|
KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes
|
||||||
|
export KUBE_GO_PACKAGE
|
||||||
|
|
||||||
KUBE_GO_PACKAGE_DIR="${KUBE_TARGET}/src/${KUBE_GO_PACKAGE}"
|
KUBE_GO_PACKAGE_DIR="${KUBE_TARGET}/src/${KUBE_GO_PACKAGE}"
|
||||||
|
|
||||||
KUBE_GO_PACKAGE_BASEDIR=$(dirname "${KUBE_GO_PACKAGE_DIR}")
|
KUBE_GO_PACKAGE_BASEDIR=$(dirname "${KUBE_GO_PACKAGE_DIR}")
|
||||||
|
Loading…
Reference in New Issue
Block a user