mirror of https://github.com/k3s-io/k3s
Hack to make godep work again
parent
0f8cc8926f
commit
ed5668f405
|
@ -18,6 +18,24 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
#### HACK ####
|
||||||
|
# Sometimes godep just can't handle things. This lets use manually put
|
||||||
|
# some deps in place first, so godep won't fall over.
|
||||||
|
preload-dep() {
|
||||||
|
org="$1"
|
||||||
|
project="$2"
|
||||||
|
sha="$3"
|
||||||
|
|
||||||
|
org_dir="${GOPATH}/src/${org}"
|
||||||
|
mkdir -p "${org_dir}"
|
||||||
|
pushd "${org_dir}" > /dev/null
|
||||||
|
git clone "https://${org}/${project}.git" > /dev/null 2>&1
|
||||||
|
pushd "${org_dir}/${project}" > /dev/null
|
||||||
|
git checkout "${sha}" > /dev/null 2>&1
|
||||||
|
popd > /dev/null
|
||||||
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
|
@ -43,6 +61,11 @@ GODEP="${_tmpdir}/bin/godep"
|
||||||
|
|
||||||
# fill out that nice clean place with the kube godeps
|
# fill out that nice clean place with the kube godeps
|
||||||
echo "Starting to download all kubernetes godeps. This takes a while"
|
echo "Starting to download all kubernetes godeps. This takes a while"
|
||||||
|
|
||||||
|
# github.com/prometheus/client_golang removed the model and extraction directory.
|
||||||
|
# thus go get fails and thus godep fails. So load it by hand.
|
||||||
|
preload-dep "github.com/prometheus" "client_golang" "692492e54b553a81013254cc1fba4b6dd76fad30"
|
||||||
|
|
||||||
"${GODEP}" restore
|
"${GODEP}" restore
|
||||||
echo "Download finished"
|
echo "Download finished"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue