Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix various shell bugs #868

Merged
merged 8 commits into from
Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hack/update-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion hack/verify_clientset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions scripts/ci-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci-is-vendor-in-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions scripts/ci-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions scripts/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
2 changes: 0 additions & 2 deletions scripts/fetch_ext_bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down