mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-15 20:37:39 +00:00
Neutralize obsolete verify scripts
This is all obsolete or covered by verify-codegen now.
This commit is contained in:
@@ -14,41 +14,5 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This script checks whether updating of generated code is needed or not. We
|
||||
# should run `make generated_files` if generated code is out of date.
|
||||
# Usage: `hack/verify-generated-files.sh`.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
export KUBE_ROOT
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
kube::util::ensure_clean_working_dir
|
||||
|
||||
_tmpdir="$(kube::realpath "$(mktemp -d -t verify-generated-files.XXXXXX)")"
|
||||
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}"
|
||||
|
||||
# clean out anything from the temp dir that's not checked in
|
||||
git clean -ffxd
|
||||
# regenerate any generated code
|
||||
make generated_files
|
||||
|
||||
changed_files=$(git status --porcelain)
|
||||
|
||||
if [[ -n "${changed_files}" ]]; then
|
||||
echo "!!! Generated code is out of date:" >&2
|
||||
echo "${changed_files}" >&2
|
||||
echo >&2
|
||||
echo "Please run make generated_files." >&2
|
||||
exit 1
|
||||
fi
|
||||
# TODO(thockin): remove this file once all tests pass
|
||||
echo "this script is deprecated"
|
||||
|
||||
Reference in New Issue
Block a user