Neutralize obsolete verify scripts

This is all obsolete or covered by verify-codegen now.
This commit is contained in:
Tim Hockin
2022-10-01 15:34:32 -07:00
parent 70c1c795e8
commit e477d45f56
4 changed files with 5 additions and 449 deletions

View File

@@ -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"