github.imxd.top/operator-framework/operator-sdk@v0.8.2/hack/ci/check-doc-only-update.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  
     5  # Make sure the TRAVIS_COMMIT_RANGE is valid, by catching any errors and exiting.
     6  if [ -z "$TRAVIS_COMMIT_RANGE" ] || ! git rev-list --quiet $TRAVIS_COMMIT_RANGE; then
     7    echo "Invalid commit range. Skipping check for doc only update"
     8    return 0
     9  fi
    10  
    11  if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md)|(\.MD)|(\.png)|(\.pdf)|^(doc/)|^(MAINTAINERS)|^(LICENSE)'; then
    12    echo "Only doc files were updated, not running the CI."
    13    exit 0
    14  fi