3 git hooks
Colin McMillen edited this page 11 months ago

Put the following in .git/hooks/pre-commit:

#!/bin/sh
tools/scripts/lint.py || exit 1

And in Content/.git/hooks/pre-commit:

#!/bin/sh
for file in $(git status --porcelain --untracked=all | cut -b 4- | grep "\.png$") ; do pngcrush -brute -ow $file; done