fix(ci): better handling of merges in percy-skip-deps.sh

This commit is contained in:
Łukasz Mierzwa
2020-04-02 20:51:06 +01:00
parent d1327e141e
commit 9cc47c0ef2
2 changed files with 10 additions and 5 deletions
+9 -2
View File
@@ -3,9 +3,16 @@
set -o errexit
set -o pipefail
env | grep TRAVIS | sort
git log --no-merges --name-only --pretty=format: ${1}..${2} | grep -Ev '^$' | sort | uniq | while read FILE ; do
if [ "${TRAVIS_BRANCH}" == "master" ] && [ -n ${TRAVIS_COMMIT_RANGE} ]; then
RANGE="${TRAVIS_COMMIT_RANGE}"
else
git fetch origin master
RANGE="FETCH_HEAD...${TRAVIS_COMMIT}"
fi
git log --no-merges --name-only --pretty=format: ${RANGE} | grep -Ev '^$' | sort | uniq | while read FILE ; do
if [[ "${FILE}" =~ ^ui/src/.+ ]]; then
echo "[P] ${FILE}"
exit 1