Last active
December 12, 2017 10:27
-
-
Save petrikoz/a260a3496370d3f90cef to your computer and use it in GitHub Desktop.
Git's hook
This file contains hidden or 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
#!/usr/bin/env sh | |
# Put this file in 'project/src/.git/hooks' folder | |
# Change author in Python's source code | |
my_credits='My Name ([email protected])' | |
company_credits='Company ([email protected])' | |
find . -type f -iname '*.py' -exec sed -i -e "s/$my_credits/$company_credits/g" {} + | |
# Sort Python's imports in source code | |
find . -type f -iname '*.py' -exec isort {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment