Created
August 29, 2017 13:45
-
-
Save guybowden/c495730ee5a9d169ae77076adf216ad3 to your computer and use it in GitHub Desktop.
Post commit hook to copy procfile if migrations are detected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SRC_PATTERN="migrations/" | |
git show --name-only | if grep --quiet "$SRC_PATTERN" | |
then | |
cp Procfile_with_release Procfile | |
git commit . -m "Added release command since a migration file was modified or created." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment