2018-10-21 13:43:47 -04:00
|
|
|
#!/usr/bin/env python
|
2019-02-12 15:20:32 -05:00
|
|
|
# This program fails if ./tools/format.py changes any files.
|
2018-10-21 13:43:47 -04:00
|
|
|
|
|
|
|
import sys
|
|
|
|
import util
|
|
|
|
import sys
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
2018-11-30 03:27:41 -05:00
|
|
|
def main():
|
2019-02-12 15:20:32 -05:00
|
|
|
util.run([sys.executable, "tools/format.py"])
|
2018-10-21 13:43:47 -04:00
|
|
|
output = util.run_output(
|
|
|
|
["git", "status", "-uno", "--porcelain", "--ignore-submodules"])
|
|
|
|
if len(output) > 0:
|
2019-02-12 15:20:32 -05:00
|
|
|
print "Run tools/format.py "
|
2018-10-21 13:43:47 -04:00
|
|
|
print output
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2018-11-30 03:27:41 -05:00
|
|
|
main()
|