Created
August 2, 2018 12:30
-
-
Save eminetto/d56a23cbaed473db47cf73af32f7f9a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
export IGNORE_FILES=$(ls -p | grep -v /) | |
detect_changed_folders() { | |
if [[ "${DRONE_PULL_REQUEST}" ]]; then | |
folders=$(git --no-pager diff --name-only FETCH_HEAD FETCH_HEAD~1 | sort -u | awk 'BEGIN {FS="/"} {print $1}' | uniq); | |
else | |
folders=$(git --no-pager diff --name-only HEAD~1 | sort -u | awk 'BEGIN {FS="/"} {print $1}' | uniq); | |
fi | |
export changed_components=$folders | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment