From 1b8d7afe8b8678a428ab3bb0a546a93327035c06 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:52:38 -0700 Subject: [PATCH 1/8] fix errors in scripts/ci-build.gitsh --- scripts/ci-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 132ec8260732..fbd9fca08251 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -18,6 +18,6 @@ set -o errexit set -o nounset set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -cd $REPO_ROOT && make manager clusterctl +cd "$REPO_ROOT" && make manager clusterctl From 40a4c4c2861328fde4d84cea0a9baee49512342e Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:53:38 -0700 Subject: [PATCH 2/8] fix errors in scripts/ci-integration.sh --- scripts/ci-integration.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ci-integration.sh b/scripts/ci-integration.sh index 5d664c3369d2..777125b09691 100755 --- a/scripts/ci-integration.sh +++ b/scripts/ci-integration.sh @@ -38,7 +38,7 @@ install_kubectl() { } build_containers() { - VERSION=$(git describe --exact-match 2> /dev/null || git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8) + VERSION="$(git describe --exact-match 2> /dev/null || git describe --match="$(git rev-parse --short=8 HEAD)" --always --dirty --abbrev=8)" CONTROLLER_IMG="${CONTROLLER_REPO}:${VERSION}" EXAMPLE_PROVIDER_IMG="${EXAMPLE_PROVIDER_REPO}:${VERSION}" export CONTROLLER_IMG="${CONTROLLER_IMG}" @@ -58,7 +58,8 @@ prepare_crd_yaml() { create_bootstrap() { go get sigs.k8s.io/kind kind create cluster --name "${BOOTSTRAP_CLUSTER_NAME}" - export KUBECONFIG="$(kind get kubeconfig-path --name="${BOOTSTRAP_CLUSTER_NAME}")" + KUBECONFIG="$(kind get kubeconfig-path --name="${BOOTSTRAP_CLUSTER_NAME}")" + export KUBECONFIG kind load docker-image "${CONTROLLER_IMG}" --name "${BOOTSTRAP_CLUSTER_NAME}" kind load docker-image "${EXAMPLE_PROVIDER_IMG}" --name "${BOOTSTRAP_CLUSTER_NAME}" From 77c4bd4693c5b4f26571f71a2f48acb5f026b16c Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:54:13 -0700 Subject: [PATCH 3/8] fix errors in scripts/ci-is-vendor-in-sync.sh --- scripts/ci-is-vendor-in-sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci-is-vendor-in-sync.sh b/scripts/ci-is-vendor-in-sync.sh index 71c11a718ab6..d4d04d935539 100755 --- a/scripts/ci-is-vendor-in-sync.sh +++ b/scripts/ci-is-vendor-in-sync.sh @@ -18,8 +18,8 @@ set -o errexit set -o nounset set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -cd $REPO_ROOT +cd "$REPO_ROOT" find vendor -name 'BUILD.bazel' -delete dep check From d785e0d60de523819e085a61583af640861799c1 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:54:34 -0700 Subject: [PATCH 4/8] fix errors in scripts/ci-make.sh --- scripts/ci-make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci-make.sh b/scripts/ci-make.sh index 7c55a20df6b4..542f741cb9d6 100755 --- a/scripts/ci-make.sh +++ b/scripts/ci-make.sh @@ -18,6 +18,6 @@ set -o errexit set -o nounset set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -cd $REPO_ROOT && make lint-full docker-build +cd "$REPO_ROOT" && make lint-full docker-build From ce4c92501f874fba6da2ca156165f6886e5ac5fb Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:55:29 -0700 Subject: [PATCH 5/8] fix errors in scripts/ci-test.sh --- scripts/ci-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci-test.sh b/scripts/ci-test.sh index 909cf601282e..a697bc3b86be 100755 --- a/scripts/ci-test.sh +++ b/scripts/ci-test.sh @@ -18,9 +18,9 @@ set -o errexit set -o nounset set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -cd $REPO_ROOT && \ +cd "$REPO_ROOT" && \ source ./scripts/fetch_ext_bins.sh && \ fetch_tools && \ setup_envs && \ From 31a7c6f0fe6cd27ddfe796b3cd1c010bc4b871c4 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:57:18 -0700 Subject: [PATCH 6/8] removed unused variables from scripts/fetch_ext_bins.sh --- scripts/fetch_ext_bins.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/fetch_ext_bins.sh b/scripts/fetch_ext_bins.sh index 7b0f29173ece..fcb4aa7e702c 100755 --- a/scripts/fetch_ext_bins.sh +++ b/scripts/fetch_ext_bins.sh @@ -59,11 +59,9 @@ function header_text { echo "$header$*$reset" } -rc=0 tmp_root=/tmp kb_root_dir=$tmp_root/kubebuilder -kb_orig=$(pwd) # Skip fetching and untaring the tools by setting the SKIP_FETCH_TOOLS variable # in your environment to any value: From 3ee8119a1285cd72f77dcf2ea4644068ccb91ea1 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 13:59:27 -0700 Subject: [PATCH 7/8] fix errors in hack/update-bazel.sh --- hack/update-bazel.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/update-bazel.sh b/hack/update-bazel.sh index b32b850967eb..a00bd54e3d08 100755 --- a/hack/update-bazel.sh +++ b/hack/update-bazel.sh @@ -17,8 +17,9 @@ set -o errexit set -o nounset set -o pipefail -export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. +export KUBE_ROOT -cd $KUBE_ROOT -find $KUBE_ROOT/vendor -name 'BUILD' -delete +cd "${KUBE_ROOT}" +find "${KUBE_ROOT}/vendor" -name 'BUILD' -delete bazel run //:gazelle From 0bfa8c440015d6d418555d27b53cbc505c9d4b7f Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 31 Mar 2019 14:00:40 -0700 Subject: [PATCH 8/8] fix errors in hack/verify_clientset.sh --- hack/verify_clientset.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/verify_clientset.sh b/hack/verify_clientset.sh index 939c8734814e..8554bbac042f 100755 --- a/hack/verify_clientset.sh +++ b/hack/verify_clientset.sh @@ -18,11 +18,12 @@ set -o errexit set -o nounset set -o pipefail -SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/.. +SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. DIFFROOT="${SCRIPT_ROOT}/pkg/client" TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/pkg" _tmp="${SCRIPT_ROOT}/_tmp" GOPATH=$(go env GOPATH) +export GOPATH cleanup() { rm -rf "${_tmp}"