Skip to content

Commit

Permalink
cmd/cue: add a reference to the Central Registry from cue help modules
Browse files Browse the repository at this point in the history
The `cue help modules` text does not mention the central registry
directly. Change the docs to include a link to something explaining how
to work it.

Fixes #3202

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: Iac942507a2497e10b386008e9abdd773bc259b4a
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198081
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
  • Loading branch information
rogpeppe committed Jul 22, 2024
1 parent e9bc377 commit 8986233
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions cmd/cue/cmd/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,18 @@ A module is a collection of packages that are released, versioned, and
distributed together. Modules are downloaded from OCI-compliant
artifact registries.
The Central Registry for CUE modules (` + modconfig.DefaultRegistry + `) is
used as the source for external modules by default.
For a detailed reference on modules:
https://cuelang.org/docs/reference/modules/
For tutorials on how to use the Central Registry, see:
https://cuelang.org/docs/tutorial/working-with-the-central-registry/
https://cuelang.org/docs/tutorial/publishing-modules-to-the-central-registry/
For a tutorial on how to work with a custom OCI registry for CUE modules:
https://cuelang.org/docs/tutorial/working-with-a-custom-module-registry/
Expand All @@ -303,8 +311,8 @@ Given a particular registry configuration, it's possible to work what registry a
given module is stored in, and what repository within that registry, without
making any network calls.
If no explicit registry configuration is present, a default central registry
(` + modconfig.DefaultRegistry + `) will be used for all modules.
If no explicit registry configuration is present, a default Central Registry
(` + modconfig.DefaultRegistry + `) is used for all modules.
The simplest way of specifying a registry configuration is to set $CUE_REGISTRY
to the hostname of that registry.
Expand Down
4 changes: 2 additions & 2 deletions cmd/cue/cmd/testdata/script/help_registryconfig.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Given a particular registry configuration, it's possible to work what registry a
given module is stored in, and what repository within that registry, without
making any network calls.

If no explicit registry configuration is present, a default central registry
(registry.cue.works) will be used for all modules.
If no explicit registry configuration is present, a default Central Registry
(registry.cue.works) is used for all modules.

The simplest way of specifying a registry configuration is to set $CUE_REGISTRY
to the hostname of that registry.
Expand Down

0 comments on commit 8986233

Please sign in to comment.