2016-03-10 18:45:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-06-03 00:25:58 +00:00
|
|
|
# Copyright 2016 The Kubernetes Authors.
|
2016-03-10 18:45:36 +00:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
2016-08-06 05:56:30 +00:00
|
|
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
2017-03-08 12:36:42 +00:00
|
|
|
source "${KUBE_ROOT}/hack/lib/util.sh"
|
2016-03-10 18:45:36 +00:00
|
|
|
|
2017-03-12 21:06:19 +00:00
|
|
|
kube::util::ensure_godep_version v79
|
2016-08-06 05:56:30 +00:00
|
|
|
|
2016-03-10 18:45:36 +00:00
|
|
|
# Some things we want in godeps aren't code dependencies, so ./...
|
|
|
|
# won't pick them up.
|
|
|
|
REQUIRED_BINS=(
|
|
|
|
"github.com/ugorji/go/codec/codecgen"
|
|
|
|
"github.com/onsi/ginkgo/ginkgo"
|
2016-10-22 16:12:57 +00:00
|
|
|
"github.com/jteeuwen/go-bindata/go-bindata"
|
2016-03-10 18:45:36 +00:00
|
|
|
"./..."
|
|
|
|
)
|
|
|
|
|
|
|
|
pushd "${KUBE_ROOT}" > /dev/null
|
2017-03-08 12:36:42 +00:00
|
|
|
GOPATH=${GOPATH}:${KUBE_ROOT}/staging godep save "${REQUIRED_BINS[@]}"
|
|
|
|
|
2016-08-06 05:56:30 +00:00
|
|
|
# create a symlink in vendor directory pointing to the staging client. This
|
|
|
|
# let other packages use the staging client as if it were vendored.
|
|
|
|
if [ ! -e "vendor/k8s.io/client-go" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/client-go vendor/k8s.io/client-go
|
|
|
|
fi
|
2017-01-04 14:18:35 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/apiserver" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/apiserver vendor/k8s.io/apiserver
|
|
|
|
fi
|
2017-01-05 16:51:51 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/apimachinery" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/apimachinery vendor/k8s.io/apimachinery
|
|
|
|
fi
|
2017-02-14 15:04:28 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/kube-aggregator" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/kube-aggregator vendor/k8s.io/kube-aggregator
|
|
|
|
fi
|
2017-03-17 19:33:58 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/kube-apiextensions-server" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/kube-apiextensions-server vendor/k8s.io/kube-apiextensions-server
|
|
|
|
fi
|
2017-02-01 13:18:37 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/sample-apiserver" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/sample-apiserver vendor/k8s.io/sample-apiserver
|
|
|
|
fi
|
2017-05-01 18:33:33 +00:00
|
|
|
if [ ! -e "vendor/k8s.io/metrics" ]; then
|
|
|
|
ln -s ../../staging/src/k8s.io/metrics vendor/k8s.io/metrics
|
|
|
|
fi
|
2016-03-10 18:45:36 +00:00
|
|
|
popd > /dev/null
|
2016-09-22 20:41:27 +00:00
|
|
|
|
|
|
|
echo "Don't forget to run hack/update-godep-licenses.sh if you added or removed a dependency!"
|