Skip to content

Commit

Permalink
reset only when CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Feb 4, 2021
1 parent 844ac84 commit 030d2e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/assert-changed-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ fi

FILES_COUNT="$(git diff-tree --no-commit-id --name-only -r "$CIRCLE_BRANCH" origin/master | grep -E "$GREP_PATTERN" -c)"

# reset to previous state
git reset --hard HEAD@{1}
if [ "$IS_CI" = true ]; then
# reset to previous state
git reset --hard $CIRCLE_SHA1
fi

if [ "$FILES_COUNT" -eq 0 ]; then
echo "0 files matching '$GREP_PATTERN'; exiting and marking successful."
Expand Down

0 comments on commit 030d2e5

Please sign in to comment.