Last active
June 22, 2020 10:15
-
-
Save msewell/d9b8a95076770c64061db96b5231d8c7 to your computer and use it in GitHub Desktop.
Xcode behavior: run git client after successful test run
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/bash | |
cd $(dirname $XcodeProjectPath) # Xcode will fill $XcodeProjectPath with your project's path when run this script from an Xcode behavior | |
swiftlint autocorrect --config ~/Developer/.swiftlint.yml # Replace the path to your .swiftlint.yml if necessary (or leave it out entirely) | |
git diff-index --quiet HEAD || /usr/local/bin/stree $pwd # `stree` opens SourceTree, but can be replaced with your git client of choice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment