• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2title: 'SK CLI Tool'
3linkTitle: 'SK CLI Tool'
4---
5
6## Introduction
7
8`sk` is a command-line tool which provides common functionality useful for
9working on Skia.
10
11## Commands
12
13The set of supported commands will probably grow or change over time.
14
15### asset
16
17Used for managing versioned non-code assets used by Skia developers and in CI.
18These are stored in [CIPD](https://chrome-infra-packages.appspot.com/p/skia/bots)
19and their versions are pinned under
20[//infra/bots/assets](https://skia.googlesource.com/skia/+/main/infra/bots/assets)
21in Skia.
22
23* add - Add an entry for a new asset. This does not create an initial version.
24* remove - Remove the entry for an existing asset. This does not remove uploaded
25  versions.
26* download - Download the pinned version of the asset into the given directory.
27* upload - Upload a new version of the asset and update the pinned version. If
28  a script exists to automate creation of the asset, `sk` that runs script and
29  uploads the resulting files. Otherwise, it expects a target directory to be
30  provided.
31* get-version - Print the pinned version of the asset.
32* set-version - Set the pinned version of the asset. `sk` verifies that the
33  given version actually exists in CIPD.
34* list-versions - Print all versions of the asset which exist in CIPD.
35
36### release-branch
37
38This automates the processes involved in creating a new release branch of Skia,
39including creating the Git branch itself, setting up the commit queue on the
40new branch (as well as retiring the commit queue for the oldest release branch),
41and updating the current Skia milestone.  This requires administrator rights.
42
43### try
44
45Trigger try jobs on the current active CL.  Accepts zero or more job names or
46regular expressions.  If none is provided, `try` lists all of the available try
47jobs and exits.
48
49## Development
50
51The code for `sk` is located in the
52[Skia Infra repo](https://skia.googlesource.com/buildbot). Development in that
53repo follows similar practices to Skia.  See
54[README.md](https://skia.googlesource.com/buildbot/+/main/README.md) for
55instructions to get started.
56
57Code for the `sk` tool itself is located under
58[//sk/go/](https://skia.googlesource.com/buildbot/+/main/sk/go/). Each
59sub-command has an associated package.
60
61## Deployment
62
63New versions of `sk` are automatically built and uploaded to
64[CIPD](https://chrome-infra-packages.appspot.com/p/skia/tools/sk) as part of
65Skia Infra's CI/CD pipeline.  The version used by Skia is pinned in
66[DEPS](https://skia.googlesource.com/skia/+/main/DEPS) and updated by an
67[autoroller](https://autoroll.skia.org/r/sk-tool-skia).
68