1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2025-06-14 18:53:35 +00:00
Files
cephfs
deploy
docs
examples
pkg
rbd
vendor
github.com
golang.org
google.golang.org
gopkg.in
k8s.io
api
apimachinery
client-go
kubernetes
.github
Godeps
api
build
cluster
cmd
docs
hack
boilerplate
e2e-internal
gen-swagger-doc
jenkins
lib
make-rules
testdata
verify-flags
.golint_failures
.spelling_failures
BUILD
OWNERS
autogenerated_placeholder.txt
benchmark-go.sh
build-cross.sh
build-go.sh
build-ui.sh
cherry_pick_pull.sh
dev-build-and-push.sh
dev-build-and-up.sh
dev-push-hyperkube.sh
e2e-node-test.sh
e2e.go
e2e_test.go
generate-bindata.sh
generate-docs.sh
get-build.sh
ginkgo-e2e.sh
godep-restore.sh
godep-save.sh
grab-profiles.sh
import-restrictions.yaml
install-etcd.sh
list-feature-tests.sh
local-up-cluster.sh
print-workspace-status.sh
run-in-gopath.sh
test-go.sh
test-integration.sh
test-update-storage-objects.sh
update-all.sh
update-api-reference-docs.sh
update-bazel.sh
update-cloudprovider-gce.sh
update-codegen.sh
update-generated-device-plugin-dockerized.sh
update-generated-device-plugin.sh
update-generated-docs.sh
update-generated-kms-dockerized.sh
update-generated-kms.sh
update-generated-kubelet-plugin-registration-dockerized.sh
update-generated-kubelet-plugin-registration.sh
update-generated-protobuf-dockerized.sh
update-generated-protobuf.sh
update-generated-runtime-dockerized.sh
update-generated-runtime.sh
update-generated-swagger-docs.sh
update-godep-licenses.sh
update-gofmt.sh
update-openapi-spec.sh
update-staging-godeps-dockerized.sh
update-staging-godeps.sh
update-swagger-spec.sh
update-translations.sh
update-workspace-mirror.sh
update_owners.py
verify-all.sh
verify-api-groups.sh
verify-api-reference-docs.sh
verify-bazel.sh
verify-boilerplate.sh
verify-cli-conventions.sh
verify-cloudprovider-gce.sh
verify-codegen.sh
verify-description.sh
verify-flags-underscore.py
verify-generated-device-plugin.sh
verify-generated-docs.sh
verify-generated-files-remake.sh
verify-generated-files.sh
verify-generated-kms.sh
verify-generated-kubelet-plugin-registration.sh
verify-generated-protobuf.sh
verify-generated-runtime.sh
verify-generated-swagger-docs.sh
verify-godep-licenses.sh
verify-godeps.sh
verify-gofmt.sh
verify-golint.sh
verify-govet.sh
verify-import-boss.sh
verify-imports.sh
verify-linkcheck.sh
verify-no-vendor-cycles.sh
verify-openapi-spec.sh
verify-pkg-names.sh
verify-readonly-packages.sh
verify-spelling.sh
verify-staging-godeps.sh
verify-swagger-spec.sh
verify-symbols.sh
verify-test-images.sh
verify-test-owners.sh
verify-typecheck.sh
logo
pkg
plugin
staging
test
third_party
translations
.generated_files
.gitattributes
.gitignore
CHANGELOG-1.11.md
CHANGELOG.md
CONTRIBUTING.md
LICENSE
OWNERS
OWNERS_ALIASES
README.md
SECURITY_CONTACTS
SUPPORT.md
code-of-conduct.md
labels.yaml
utils
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
deploy.sh
ceph-csi/vendor/k8s.io/kubernetes/hack/verify-bazel.sh

53 lines
1.6 KiB
Bash
Raw Normal View History

2018-01-09 13:57:14 -05:00
#!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors.
#
# 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
export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
if [[ ! -f "${KUBE_ROOT}/vendor/BUILD" ]]; then
2018-03-06 17:33:18 -05:00
echo "${KUBE_ROOT}/vendor/BUILD does not exist." >&2
echo >&2
echo "Run ./hack/update-bazel.sh" >&2
2018-01-09 13:57:14 -05:00
exit 1
fi
# Remove generated files prior to running kazel.
# TODO(spxtr): Remove this line once Bazel is the only way to build.
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
2018-07-18 16:47:22 +02:00
_tmpdir="$(kube::realpath $(mktemp -d -t verify-bazel.XXXXXX))"
2018-01-09 13:57:14 -05:00
kube::util::trap_add "rm -rf ${_tmpdir}" EXIT
_tmp_gopath="${_tmpdir}/go"
_tmp_kuberoot="${_tmp_gopath}/src/k8s.io/kubernetes"
mkdir -p "${_tmp_kuberoot}/.."
cp -a "${KUBE_ROOT}" "${_tmp_kuberoot}/.."
cd "${_tmp_kuberoot}"
2018-07-18 16:47:22 +02:00
GOPATH="${_tmp_gopath}" PATH="${_tmp_gopath}/bin:${PATH}" ./hack/update-bazel.sh
2018-01-09 13:57:14 -05:00
2018-07-18 16:47:22 +02:00
diff=$(diff -Naupr -x '_output' "${KUBE_ROOT}" "${_tmp_kuberoot}" || true)
2018-01-09 13:57:14 -05:00
if [[ -n "${diff}" ]]; then
2018-03-06 17:33:18 -05:00
echo "${diff}" >&2
echo >&2
echo "Run ./hack/update-bazel.sh" >&2
2018-01-09 13:57:14 -05:00
exit 1
fi