Merge pull request #720 from filbranden/cleanup

Clean up shell scripts used for build, executable bit on files
This commit is contained in:
brendandburns 2014-08-01 09:27:54 -07:00
commit 2274599de8
18 changed files with 47 additions and 38 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
cluster/saltbase/pillar/top.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/base.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/cadvisor/init.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/docker/init.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/etcd/etcd.conf Executable file → Normal file
View File

0
cluster/saltbase/salt/etcd/init.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/golang.sls Executable file → Normal file
View File

0
cluster/saltbase/salt/top.sls Executable file → Normal file
View File

View File

@ -16,19 +16,29 @@
# This script sets up a go workspace locally and builds all go components. # This script sets up a go workspace locally and builds all go components.
set -e set -o errexit
set -o nounset
set -o pipefail
hackdir=$(dirname "$0")
# Set the environment variables required by the build.
. "${hackdir}/config-go.sh"
# Go to the top of the tree.
cd "${KUBE_REPO_ROOT}"
# Update the version. # Update the version.
$(dirname $0)/version-gen.sh "${hackdir}/version-gen.sh"
source $(dirname $0)/config-go.sh if [[ $# == 0 ]]; then
# Update $@ with the default list of targets to build.
cd "${KUBE_TARGET}" set -- cmd/proxy cmd/apiserver cmd/controller-manager cmd/kubelet cmd/kubecfg
BINARIES="cmd/proxy cmd/apiserver cmd/controller-manager cmd/kubelet cmd/kubecfg"
if [ $# -gt 0 ]; then
BINARIES="$@"
fi fi
go install $(for b in $BINARIES; do echo "${KUBE_GO_PACKAGE}"/${b}; done) binaries=()
for arg; do
binaries+=("${KUBE_GO_PACKAGE}/${arg}")
done
go install "${binaries[@]}"

53
hack/config-go.sh Executable file → Normal file
View File

@ -17,51 +17,50 @@
# This script sets up a go workspace locally and builds all go components. # This script sets up a go workspace locally and builds all go components.
# You can 'source' this file if you want to set up GOPATH in your local shell. # You can 'source' this file if you want to set up GOPATH in your local shell.
if [[ "$(which go)" == "" ]]; then if [[ -z "$(which go)" ]]; then
echo "Can't find 'go' in PATH, please fix and retry." echo "Can't find 'go' in PATH, please fix and retry." >&2
echo "See http://golang.org/doc/install for installation instructions." echo "See http://golang.org/doc/install for installation instructions." >&2
exit 1 exit 1
fi fi
# Travis continuous build uses a head go release that doesn't report # Travis continuous build uses a head go release that doesn't report
# a version number, so we skip this check on Travis. Its unnecessary # a version number, so we skip this check on Travis. Its unnecessary
# there anyway. # there anyway.
if [ "${TRAVIS}" != "true" ]; then if [[ "${TRAVIS:-}" != "true" ]]; then
GO_VERSION=($(go version)) GO_VERSION=($(go version))
if [[ "${GO_VERSION[2]}" < "go1.2" ]]; then
if [[ ${GO_VERSION[2]} < "go1.2" ]]; then echo "Detected go version: ${GO_VERSION[*]}." >&2
echo "Detected go version: ${GO_VERSION}." echo "Kubernetes requires go version 1.2 or greater." >&2
echo "Kubernetes requires go version 1.2 or greater." echo "Please install Go version 1.2 or later" >&2
echo "Please install Go version 1.2 or later"
exit 1 exit 1
fi fi
fi fi
if [[ "$OSTYPE" == *darwin* ]]; then KUBE_REPO_ROOT=$(dirname "${BASH_SOURCE:-$0}")/..
KUBE_REPO_ROOT="${PWD}/$(dirname ${BASH_SOURCE:-$0})/.." if [[ "${OSTYPE:-}" == *darwin* ]]; then
# Make the path absolute if it is not.
if [[ "${KUBE_REPO_ROOT}" != /* ]]; then
KUBE_REPO_ROOT=${PWD}/${KUBE_REPO_ROOT}
fi
else else
KUBE_REPO_REL_ROOT="$(dirname ${BASH_SOURCE:-$0})/.." # Resolve symlinks.
KUBE_REPO_ROOT="$(readlink -f ${KUBE_REPO_REL_ROOT})" KUBE_REPO_ROOT=$(readlink -f "${KUBE_REPO_ROOT}")
fi fi
KUBE_TARGET="${KUBE_REPO_ROOT}/output/go" KUBE_TARGET="${KUBE_REPO_ROOT}/output/go"
mkdir -p "${KUBE_TARGET}" mkdir -p "${KUBE_TARGET}"
KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes
export GOPATH="${KUBE_TARGET}" KUBE_GO_PACKAGE_DIR="${KUBE_TARGET}/src/${KUBE_GO_PACKAGE}"
KUBE_GO_PACKAGE_DIR="${GOPATH}/src/${KUBE_GO_PACKAGE}"
( KUBE_GO_PACKAGE_BASEDIR=$(dirname "${KUBE_GO_PACKAGE_DIR}")
PACKAGE_BASE=$(dirname "${KUBE_GO_PACKAGE_DIR}") mkdir -p "${KUBE_GO_PACKAGE_BASEDIR}"
if [ ! -d "${PACKAGE_BASE}" ]; then
mkdir -p "${PACKAGE_BASE}"
fi
rm "${KUBE_GO_PACKAGE_DIR}" >/dev/null 2>&1 || true # Create symlink under output/go/src.
ln -s "${KUBE_REPO_ROOT}" "${KUBE_GO_PACKAGE_DIR}" ln -snf "${KUBE_REPO_ROOT}" "${KUBE_GO_PACKAGE_DIR}"
)
# unset GOBIN in case it already exsit in the current session GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/third_party"
export GOPATH
# Unset GOBIN in case it already exsits in the current session.
unset GOBIN unset GOBIN
export GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/third_party"

0
third_party/src/code.google.com/p/go-uuid/uuid/dce.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/go-uuid/uuid/doc.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/go-uuid/uuid/node.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/go-uuid/uuid/time.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/go-uuid/uuid/uuid.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/go-uuid/uuid/uuid_test.go vendored Executable file → Normal file
View File

0
third_party/src/code.google.com/p/goauth2/oauth/example/oauthreq.go vendored Executable file → Normal file
View File