build 396 B

1234567891011121314
  1. #!/usr/bin/env python
  2. import os
  3. print('compile proto to go file')
  4. for cur, dirs, files in os.walk('.'):
  5. if cur[2:8] == 'google':
  6. continue
  7. for file in files:
  8. f, ext = os.path.splitext(file)
  9. if ext != '.proto':
  10. continue
  11. os.system('protoc --go_out=. {}'.format(os.path.join(cur,file)))
  12. print('.')
  13. print('done. check if there any errors')