1
0
Fork 0
telegraf/scripts/check-file-changes.sh
Daniel Baumann 4978089aab
Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-24 07:26:29 +02:00

12 lines
790 B
Bash
Executable file

#!/bin/bash
# CIRCLE-CI SCRIPT: This file is used exclusively for CI
# To prevent the tests/builds to run for only a doc change, this script checks what files have changed in a pull request.
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo $BRANCH
if [[ ${CIRCLE_PULL_REQUEST##*/} != "" ]]; then # Only skip if their is an associated pull request with this job
# Ask git for all the differences between this branch and master
# Then use grep to look for changes in the .circleci/ directory, anything named *.go or *.mod or *.sum or *.sh or Makefile
# If no match is found, then circleci step halt will stop the CI job but mark it successful
git diff master --name-only --no-color | egrep -e "^(\.circleci\/.*)$|^(.*\.(go|mod|sum|sh))$|^Makefile$" || circleci step halt;
fi