diff options
| author | Joseph Richey <joerichey@google.com> | 2018-02-11 21:43:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-11 21:43:56 -0800 |
| commit | 8b6cbfcca9d1f3fb5b05a91b4ac0bca66f75f19e (patch) | |
| tree | 5f6fdc40c7518bc23a63fdac9a92b516dd0c6d36 /bin | |
| parent | aebae1aae2fc61185a8bbc96313d8462727ad202 (diff) | |
| parent | b330463662825a7d7b22efabb2b7a40640d2b18e (diff) | |
Merge pull request #85 from google/depfix
Complete the new Build System
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/files-changed | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/files-changed b/bin/files-changed new file mode 100755 index 0000000..3ffbad6 --- /dev/null +++ b/bin/files-changed @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Detect if any files have changed in the git repository. Output an appropriate +# error message if they have changed. + +if [[ -n $(git status -s) ]]; then + git diff --minimal HEAD + echo + echo "**************************************************" + case "$1" in + "proto") + echo "* .pb.go files and .proto files are out of sync. *" + echo "* Run \"make gen\" to generate them. *" + ;; + "format") + echo "* C or Go files have incorrect formatting. *" + echo "* Run \"make format\" to fix them. *" + ;; + *) + echo "* Files have changed in this repository. *" + ;; + esac + echo "**************************************************" + git reset HEAD --hard + exit 1 +fi
\ No newline at end of file |