mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Require go-bindata to already be installed
This commit is contained in:
parent
b03784934d
commit
4df99a8a0f
@ -19,7 +19,7 @@ set -o pipefail
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
if [[ -z "${KUBE_ROOT:-}" ]]; then
|
if [[ -z "${KUBE_ROOT:-}" ]]; then
|
||||||
echo "KUBE_ROOT not detected, setting default."
|
# Relative to test/e2e/generated/
|
||||||
KUBE_ROOT="../../../"
|
KUBE_ROOT="../../../"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -28,25 +28,14 @@ if [[ ! -d "${KUBE_ROOT}/examples" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup bindata if not already in the system.
|
if ! which go-bindata &>/dev/null ; then
|
||||||
# For separation of concerns, download first, then install later.
|
echo "Cannot find go-bindata. Install with"
|
||||||
if ! git config -l | grep -q "user.name" && ! git config -l | grep -q "user.email" ; then
|
echo " go get -u github.com/jteeuwen/go-bindata/go-bindata"
|
||||||
git config --global user.name bindata-mockuser
|
|
||||||
git config --global user.email bindata-mockuser@example.com
|
|
||||||
fi
|
|
||||||
|
|
||||||
go get -u github.com/jteeuwen/go-bindata/... || echo "go-bindata get failed, possibly already exists, proceeding"
|
|
||||||
go install github.com/jteeuwen/go-bindata/... || echo "go-bindata install may have failed, proceeding anyway..."
|
|
||||||
|
|
||||||
if [[ ! -f ${GOPATH}/bin/go-bindata ]]; then
|
|
||||||
echo "missing bin/go-bindata"
|
|
||||||
echo "for debugging, printing search for bindata files out..."
|
|
||||||
find ${GOPATH} -name go-bindata
|
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BINDATA_OUTPUT="${KUBE_ROOT}/test/e2e/generated/bindata.go"
|
BINDATA_OUTPUT="${KUBE_ROOT}/test/e2e/generated/bindata.go"
|
||||||
${GOPATH}/bin/go-bindata -nometadata -prefix "${KUBE_ROOT}" -o ${BINDATA_OUTPUT} -pkg generated \
|
go-bindata -nometadata -prefix "${KUBE_ROOT}" -o ${BINDATA_OUTPUT} -pkg generated \
|
||||||
-ignore .jpg -ignore .png -ignore .md \
|
-ignore .jpg -ignore .png -ignore .md \
|
||||||
"${KUBE_ROOT}/examples/..." \
|
"${KUBE_ROOT}/examples/..." \
|
||||||
"${KUBE_ROOT}/docs/user-guide/..." \
|
"${KUBE_ROOT}/docs/user-guide/..." \
|
||||||
|
Loading…
Reference in New Issue
Block a user