From 428a653ffbf4143273fea5d11a26ecf2468082b0 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Wed, 1 Oct 2014 09:41:44 -0700 Subject: [PATCH] Normalize some of the boilerplate in each of the `build` commands. --- build/copy-output.sh | 4 +--- build/make-binaries.sh | 4 +--- build/make-build-image.sh | 4 +--- build/make-clean.sh | 4 +--- build/make-cross.sh | 4 +--- build/make-run-image.sh | 4 +--- build/release.sh | 4 +--- build/run-integration.sh | 4 +--- build/run-tests.sh | 4 +--- build/shell.sh | 4 +--- 10 files changed, 10 insertions(+), 30 deletions(-) diff --git a/build/copy-output.sh b/build/copy-output.sh index 1729545ca76..3e1c06f4dac 100755 --- a/build/copy-output.sh +++ b/build/copy-output.sh @@ -19,9 +19,7 @@ # This is a no-op on Linux when the Docker daemon is local. This is only # necessary on Mac OS X with boot2docker. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::copy_output diff --git a/build/make-binaries.sh b/build/make-binaries.sh index c38ef27a366..001f5953278 100755 --- a/build/make-binaries.sh +++ b/build/make-binaries.sh @@ -19,9 +19,7 @@ # This makes the docker build image, builds the binaries and copies them out # of the docker container. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/make-build-image.sh b/build/make-build-image.sh index e553ffaaa74..54e5bd09c95 100755 --- a/build/make-build-image.sh +++ b/build/make-build-image.sh @@ -21,9 +21,7 @@ # directory. It will then copy over the Dockerfile and build the kube-build # image. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/make-clean.sh b/build/make-clean.sh index c1292999774..d8f4f9fde58 100755 --- a/build/make-clean.sh +++ b/build/make-clean.sh @@ -16,9 +16,7 @@ # Clean out the output directory on the docker host. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::clean_output diff --git a/build/make-cross.sh b/build/make-cross.sh index bdbf6eff1fc..c9da5d0f083 100755 --- a/build/make-cross.sh +++ b/build/make-cross.sh @@ -19,9 +19,7 @@ # This makes the docker build image, builds the cross binaries and copies them # out of the docker container. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/make-run-image.sh b/build/make-run-image.sh index bec7270ffaa..fe90035b9f2 100755 --- a/build/make-run-image.sh +++ b/build/make-run-image.sh @@ -19,9 +19,7 @@ # This script will make the 'run image' after building all of the necessary # binaries. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/release.sh b/build/release.sh index c663bf1959c..65ea04ae355 100755 --- a/build/release.sh +++ b/build/release.sh @@ -18,9 +18,7 @@ # images and other build artifacts. All intermediate artifacts will be hosted # publicly on Google Cloud Storage currently. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/run-integration.sh b/build/run-integration.sh index d0f163ca0c9..c363a81adae 100755 --- a/build/run-integration.sh +++ b/build/run-integration.sh @@ -16,9 +16,7 @@ # Run the integration test. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/run-tests.sh b/build/run-tests.sh index e413516de45..f9d32e8389d 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -16,9 +16,7 @@ # Run all of the golang unit tests. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image diff --git a/build/shell.sh b/build/shell.sh index dd9b5389c4b..4f95f010c33 100755 --- a/build/shell.sh +++ b/build/shell.sh @@ -18,9 +18,7 @@ # # This container will have a snapshot of the current sources. -set -e - -source $(dirname $0)/common.sh +source $(dirname "${BASH_SOURCE}")/common.sh kube::build::verify_prereqs kube::build::build_image