Skip to content

Commit

Permalink
fix(ci): restore missing script
Browse files Browse the repository at this point in the history
  • Loading branch information
prymitive committed May 10, 2021
1 parent 0b8d3a9 commit 29d2a40
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions scripts/percy-skip-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

set -o errexit
set -o pipefail


if [ "${GITHUB_HEAD_REF_SLUG}" == "main" ]; then
RANGE="HEAD~.."
else
git fetch origin master
RANGE="FETCH_HEAD...${GITHUB_SHA}"
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
elif [[ "${FILE}" =~ ^ui/.storybook/.+ ]]; then
echo "[P] ${FILE}"
exit 1
elif [[ "${FILE}" == "ui/package.json" ]]; then
echo "[?] ${FILE}"
git diff --no-prefix --diff-filter=M --unified=0 ${RANGE} -- ui/package.json | grep -E '^\+ ' | tr -d '":,' | while read I NAME VERSION ; do
if [[ "${NAME}" =~ ^(@types|@sentry)/.+ ]]; then
echo "[S] ${NAME}: ${VERSION}"
else
echo "[P] ${NAME}: ${VERSION}"
exit 1
fi
done
else
echo "[ ] ${FILE}"
fi
done

exit 0

0 comments on commit 29d2a40

Please sign in to comment.