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