Tom Anderson | e7001969 | 2019-02-06 01:38:04 | [diff] [blame] | 1 | This folder contains clang-format scripts. The binaries will be automatically |
| 2 | downloaded from Google Storage by gclient runhooks for the current platform. |
| 3 | |
| 4 | For a walkthrough on how to maintain these binaries: |
John Palmer | e1d0209 | 2021-05-19 18:58:20 | [diff] [blame] | 5 | https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang_format_binaries.md |
Tom Anderson | e7001969 | 2019-02-06 01:38:04 | [diff] [blame] | 6 | |
| 7 | To upload a file: |
| 8 | python ~/depot_tools/upload_to_google_storage.py -b chromium-clang-format <FILENAME> |
| 9 | |
| 10 | On Linux and Mac, check that clang-format has its +x bit set before you run this |
| 11 | upload command. Don't upload Linux and Mac binaries from Windows, since |
| 12 | upload_to_google_storage.py will not set the +x bit on google storage when it's |
| 13 | run from Windows. |
| 14 | |
| 15 | To download a file given a .sha1 file: |
| 16 | python ~/depot_tools/download_from_google_storage.py -b chromium-clang-format -s <FILENAME>.sha1 |
| 17 | |
| 18 | List the contents of GN's Google Storage bucket: |
| 19 | python ~/depot_tools/third_party/gsutil/gsutil ls gs://chromium-clang-format/ |
| 20 | |
| 21 | To initialize gsutil's credentials: |
| 22 | python ~/depot_tools/third_party/gsutil/gsutil config |
| 23 | |
| 24 | That will give a URL which you should log into with your web browser. The |
| 25 | username should be the one that is on the ACL for the "chromium-clang-format" |
| 26 | bucket (probably your @google.com address). Contact the build team for help |
| 27 | getting access if necessary. |
| 28 | |
| 29 | Copy the code back to the command line util. Ignore the project ID (it's OK |
| 30 | to just leave blank when prompted). |
| 31 | |
| 32 | gsutil documentation: |
| 33 | https://developers.google.com/storage/docs/gsutil |