diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-26 14:29:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 14:29:56 +0200 |
commit | 0a4a81856a39f96d9684aa4de510a89e07dc510e (patch) | |
tree | 96bf8a465e3e7241cb2f4449f866de39bbf6f2da | |
parent | 1d6147fa13bd65ce2aece8b117e23174581a42e9 (diff) | |
parent | 69ac1e36c43f4ce1616716882347067ee9f40c72 (diff) | |
download | podman-0a4a81856a39f96d9684aa4de510a89e07dc510e.tar.gz podman-0a4a81856a39f96d9684aa4de510a89e07dc510e.tar.bz2 podman-0a4a81856a39f96d9684aa4de510a89e07dc510e.zip |
Merge pull request #15893 from cevich/ioutil_whine
[CI:BUILD] Cirrus: Catch use of deprecated ioutils package
-rwxr-xr-x | contrib/cirrus/runner.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 6b2d123f2..5b1bc8d5c 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -233,6 +233,25 @@ function _run_consistency() { SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh make completions SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh + + if [[ -z "$CIRRUS_TAG" ]] && \ + req_env_vars CIRRUS_CHANGE_IN_REPO CIRRUS_PR DEST_BRANCH + then + local base diffs regex i + # Prevent this check from detecting itself + i=i + msg "#####" + msg "Verifying no change adds new calls to ${i}o/${i}outil." + base=$(git merge-base $DEST_BRANCH $CIRRUS_CHANGE_IN_REPO) + diffs=$(git diff $base $CIRRUS_CHANGE_IN_REPO -- '*.go' ':^vendor/') + regex=$(echo -e "^(\\+.+${i}o/${i}outil)|(\\+.+${i}outil\\..+)") + if egrep -q "$regex"<<<"$diffs"; then + die "Found attempted use of deprecated ${i}outils: +$(egrep -B 5 -A 5 "$regex"<<<"$diffs")" + fi + else + msg "Skipping check for ${i}o/${i}outil addition." + fi } function _run_build() { |