Skip to content
Browse files

chore: merge latest changes when asserting changes (#22539)

* chore: merge latest changes when asserting changes

* remove dumb me

* fix credentials

* remove git config values

* move things around for local testing

* test global config

* test

* test2

* skip ssh, use https

* always reset
  • Loading branch information
wardpeet committed Mar 25, 2020
1 parent b21d6e0 commit d30832b5b9cdad1242258094b8a02de1c987e695
Showing with 24 additions and 0 deletions.
  1. +24 −0 scripts/
@@ -1,11 +1,35 @@


if [ "$IS_CI" = true ]; then
git config --local url."".insteadOf
git config --local "GatsbyJS Bot"
git config --local ""

git fetch origin
git merge --no-edit origin/master

if [ $? -ne 0 ]; then
echo "Branch has conflicts with master, rolling back test."
git merge --abort

git config --local --unset
git config --local --unset
git config --local --unset url."".insteadOf

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 [ "$FILES_COUNT" -eq 0 ]; then
echo "0 files matching '$GREP_PATTERN'; exiting and marking successful."
circleci step halt || exit 1
echo "$FILES_COUNT file(s) matching '$GREP_PATTERN'; continuing."

0 comments on commit d30832b

Please sign in to comment.
You can’t perform that action at this time.