Skip to content

Commit 6f92107

Browse files
committed
docs: mention gocache as depot option
Signed-off-by: Chris Goller <goller@gmail.com>
1 parent 4acedd3 commit 6f92107

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Official CLI for [Depot](https://depot.dev) - you can use the CLI to build Docke
2020
- [Flags for `build`](#flags-for-build)
2121
- [`depot cache`](#depot-cache)
2222
- [`depot cache reset`](#depot-cache-reset)
23+
- [`depot gocache`](#depot-gocache)
2324
- [`depot configure-docker`](#depot-configure-docker)
2425
- [`depot list`](#depot-list)
2526
- [`depot list projects`](#depot-list-projects)
@@ -265,6 +266,31 @@ Reset the cache of a specific project ID
265266
depot cache reset --project 12345678910
266267
```
267268

269+
### `depot gocache`
270+
271+
Configure Go tools to use Depot remote cache.
272+
The Go tools will store build artifacts in the Depot cache, and retrieve them from the cache when building again.
273+
274+
This requires Go 1.24 or later.
275+
276+
Export the environment variable `GOCACHEPROG` to use the Depot cache.
277+
278+
```shell
279+
export GOCACHEPROG='depot gocache'
280+
```
281+
282+
Next, run your Go build commands as usual.
283+
284+
```shell
285+
go build ./...
286+
```
287+
288+
To set verbose output, add the --verbose option:
289+
290+
```shell
291+
export GOCACHEPROG='depot gocache --verbose'
292+
```
293+
268294
### `depot configure-docker`
269295

270296
Configure Docker to use Depot's remote builder infrastructure. This command installs Depot as a Docker CLI plugin (i.e., `docker depot ...`) and sets the Depot plugin as the default Docker builder (i.e., `docker build`).

pkg/cmd/gocache/gocache.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func NewCmdGoCache() *cobra.Command {
5656
p := NewCache(CacheServer, orgID, token, dir, verbose)
5757
return p.Run(ctx)
5858
},
59-
Hidden: true,
6059
}
6160

6261
flags := cmd.Flags()

0 commit comments

Comments
 (0)