mirror of
https://github.com/kubevirt/containerized-data-importer.git
synced 2025-06-03 06:30:22 +00:00
Add make target to verify deps (#2922)
Add a target that tells us when deps are not in sync. We can decide if we want a lane for this (and whether it is required) later. Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com> Co-authored-by: Alex Kalenyuk <akalenyu@redhat.com>
This commit is contained in:
parent
163baba8b7
commit
2ea79c02d4
6
Makefile
6
Makefile
@ -46,8 +46,7 @@ update-codegen:
|
||||
|
||||
generate: update-codegen bazel-generate generate-doc
|
||||
|
||||
generate-verify: generate-doc
|
||||
${DO_BAZ} "./hack/verify-codegen.sh"
|
||||
generate-verify: generate
|
||||
git difftool -y --trust-exit-code --extcmd=./hack/diff-csv.sh
|
||||
|
||||
gomod-update:
|
||||
@ -55,6 +54,9 @@ gomod-update:
|
||||
|
||||
deps-update: gomod-update bazel-generate
|
||||
|
||||
deps-verify: deps-update
|
||||
git difftool -y --trust-exit-code --extcmd=./hack/diff-csv.sh
|
||||
|
||||
rpm-deps:
|
||||
${DO_BAZ} "CUSTOM_REPO=${CUSTOM_REPO} ./hack/build/rpm-deps.sh"
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
# git difftool -y --extcmd=hacks/diff-csv.sh
|
||||
#
|
||||
# currently used for make sanity
|
||||
diff --unified=1 --ignore-matching-lines='^\s*createdAt:' $@
|
||||
diff -Napr --unified=1 --ignore-matching-lines='^\s*createdAt:' $@
|
||||
|
@ -1,47 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2017 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
|
||||
|
||||
SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
DIFFROOT="${SCRIPT_ROOT}/pkg"
|
||||
TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/pkg"
|
||||
_tmp="${SCRIPT_ROOT}/_tmp"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "${_tmp}"
|
||||
}
|
||||
trap "cleanup" EXIT SIGINT
|
||||
|
||||
cleanup
|
||||
|
||||
mkdir -p "${TMP_DIFFROOT}"
|
||||
cp -a "${DIFFROOT}"/* "${TMP_DIFFROOT}"
|
||||
|
||||
"${SCRIPT_ROOT}/hack/update-codegen.sh"
|
||||
echo "diffing ${DIFFROOT} against freshly generated codegen"
|
||||
ret=0
|
||||
diff -Naupr "${DIFFROOT}" "${TMP_DIFFROOT}" -x *.bazel || ret=$?
|
||||
cp -a "${TMP_DIFFROOT}"/* "${DIFFROOT}"
|
||||
if [[ $ret -eq 0 ]]; then
|
||||
echo "${DIFFROOT} up to date."
|
||||
else
|
||||
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user