Skip to content

Instantly share code, notes, and snippets.

@1stvamp
Created November 21, 2017 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1stvamp/c3068484279d41e51948e480e3addb87 to your computer and use it in GitHub Desktop.
Save 1stvamp/c3068484279d41e51948e480e3addb87 to your computer and use it in GitHub Desktop.
# merge master changes into branch
git -c "user.name=Circle CI" -c "user.email=example@example.com" pull --no-edit --no-ff origin refs/heads/master
# Get changed directories, assuming each dir is an app, you could also do a for loop after to check for certain files which define those directories as apps, e.g. if [ -f "$APP/app.json" ]
CHANGED_APPS=$(git diff --name-status master..$(git symbolic-ref --short HEAD) | awk '{print $2}' | xargs basename)
# run builds for $CHANGED_APPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment