Skip to content

Instantly share code, notes, and snippets.

@alfonmga
Created February 15, 2019 19:33
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 alfonmga/1401c4d82f697aa81a3cddf9fd5b12e8 to your computer and use it in GitHub Desktop.
Save alfonmga/1401c4d82f697aa81a3cddf9fd5b12e8 to your computer and use it in GitHub Desktop.
if git diff --name-only HEAD^...HEAD | grep "^src/${PROJECT}"; then
echo "Changes here, run the build"
npm run test
docker build --tag elasticio/${PROJECT}:${REVISION}
docker push elasticio/${PROJECT}:${REVISION}
else
echo "No changes detected"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment