]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-container-lint: filter out file removed 1929/head
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 4 Nov 2021 19:13:30 +0000 (15:13 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Thu, 4 Nov 2021 19:15:36 +0000 (15:15 -0400)
We don't want to run shellcheck on shell script removed by a pull
request.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
ceph-container-lint/build/build

index 8181a0a121a978333e5abce6db799e01ac5616b7..e8d0fdaadbf492b3ea33786a16d9b58a79dac7cd 100755 (executable)
@@ -12,8 +12,7 @@ function generate_filelist(){
        find . -name '*.sh' | grep -vE "$IGNORE_THESE_FILES"
    else
        curl -XGET "https://api.github.com/repos/ceph/ceph-container/pulls/$pull_request_id/files" |
-       jq '.[].filename' |  # just the files please
-       tr -d '"' |  # remove the quoting from JSON
+       jq -r '.[] | select(.status != "removed") | .filename'  # just the files please (not removed)
        grep ".sh$" | # just the bash
        grep -vE "$IGNORE_THESE_FILES"
    fi