xref: /third_party/skia/infra/bots/assets/README.md (revision cb93a386)
1cb93a386Sopenharmony_ciAssets
2cb93a386Sopenharmony_ci======
3cb93a386Sopenharmony_ci
4cb93a386Sopenharmony_ciThis directory contains tooling for managing assets used by the bots.  The
5cb93a386Sopenharmony_ciprimary entry point is assets.py, which allows a user to add, remove, upload,
6cb93a386Sopenharmony_ciand download assets.
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ciAssets are stored in Google Storage, named for their version number.
9cb93a386Sopenharmony_ci
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_ciIndividual Assets
12cb93a386Sopenharmony_ci-----------------
13cb93a386Sopenharmony_ci
14cb93a386Sopenharmony_ciEach asset has its own subdirectory with the following contents:
15cb93a386Sopenharmony_ci* VERSION:  The current version number of the asset.
16cb93a386Sopenharmony_ci* [optional] create.py:  Script which creates the asset, implemented by the user and called by `sk asset upload`.
17cb93a386Sopenharmony_ci* [optional] create\_and\_upload.py:  User-implemented convenience script which wraps `sk asset upload` in whatever way makes sense for the asset.
18cb93a386Sopenharmony_ci
19cb93a386Sopenharmony_ci
20cb93a386Sopenharmony_ciExamples
21cb93a386Sopenharmony_ci-------
22cb93a386Sopenharmony_ci
23cb93a386Sopenharmony_ciAdd a new asset and upload an initial version.
24cb93a386Sopenharmony_ci
25cb93a386Sopenharmony_ci```
26cb93a386Sopenharmony_ci$ sk asset add myasset
27cb93a386Sopenharmony_ciDo you want to add a creation script for this asset? (y/n): n
28cb93a386Sopenharmony_ci$ sk asset upload --in ${MY_ASSET_LOCATION} myasset
29cb93a386Sopenharmony_ci$ git commit
30cb93a386Sopenharmony_ci```
31cb93a386Sopenharmony_ci
32cb93a386Sopenharmony_ciAdd an asset whose creation can be automated.
33cb93a386Sopenharmony_ci
34cb93a386Sopenharmony_ci```
35cb93a386Sopenharmony_ci$ sk asset add myasset
36cb93a386Sopenharmony_ciDo you want to add a creation script for this asset? (y/n): y
37cb93a386Sopenharmony_ciCreated infra/bots/assets/myasset/create.py; you will need to add implementation before uploading the asset.
38cb93a386Sopenharmony_ci$ vi infra/bots/assets/myasset/create.py
39cb93a386Sopenharmony_ci(implement the create_asset function)
40cb93a386Sopenharmony_ci$ sk asset upload myasset
41cb93a386Sopenharmony_ci$ git commit
42cb93a386Sopenharmony_ci```
43