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

Build github.com/onsi/ginkgo/ginkgo as a part of the release #7593

Merged
merged 1 commit into from May 1, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 23 additions & 6 deletions hack/lib/golang.sh
Expand Up @@ -49,6 +49,7 @@ readonly KUBE_TEST_TARGETS=(
cmd/gendocs
cmd/genman
examples/k8petstore/web-server
github.com/onsi/ginkgo/ginkgo
)
readonly KUBE_TEST_BINARIES=("${KUBE_TEST_TARGETS[@]##*/}")
readonly KUBE_TEST_BINARIES_WIN=("${KUBE_TEST_BINARIES[@]/%/.exe}")
Expand All @@ -59,6 +60,7 @@ readonly KUBE_TEST_PORTABLE=(
hack/e2e-suite
hack/e2e-internal
hack/ginkgo-e2e.sh
hack/lib
)

# If we update this we need to also update the set of golang compilers we build
Expand Down Expand Up @@ -102,7 +104,14 @@ kube::golang::is_statically_linked_library() {
kube::golang::binaries_from_targets() {
local target
for target; do
echo "${KUBE_GO_PACKAGE}/${target}"
# If the target starts with what looks like a domain name, assume it has a
# fully-qualified package name rather than one that needs the Kubernetes
# package prepended.
if [[ "${target}" =~ ^([[:alnum:]]+".")+[[:alnum:]]+"/" ]]; then
echo "${target}"
else
echo "${KUBE_GO_PACKAGE}/${target}"
fi
done
}

Expand Down Expand Up @@ -239,12 +248,20 @@ kube::golang::place_bins() {
platform_src=""
fi

local full_binpath_src="${KUBE_GOPATH}/bin${platform_src}"
if [[ -d "${full_binpath_src}" ]]; then
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
find "${full_binpath_src}" -maxdepth 1 -type f -exec \
rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
local gopaths=("${KUBE_GOPATH}")
# If targets were built inside Godeps, then we need to sync from there too.
if [[ -z ${KUBE_NO_GODEPS:-} ]]; then
gopaths+=("${KUBE_ROOT}/Godeps/_workspace")
fi
local gopath
for gopath in "${gopaths[@]}"; do
local full_binpath_src="${gopath}/bin${platform_src}"
if [[ -d "${full_binpath_src}" ]]; then
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
find "${full_binpath_src}" -maxdepth 1 -type f -exec \
rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
fi
done
done
}

Expand Down