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