Skip to content

Commit

Permalink
docs/introduction: flesh out instructions on installing from source
Browse files Browse the repository at this point in the history
Preview-Path: /docs/introduction/installation
Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I901abb9703b8098ced5e9291bea460740fc4effd
  • Loading branch information
myitcv committed Sep 5, 2024
1 parent 1db4043 commit 2b884cc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
26 changes: 21 additions & 5 deletions content/docs/introduction/installation/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ that's appropriate for your operating system.
On Linux, Microsoft Windows, and macOS, the `cue` command can be downloaded from the
[official CUE releases](https://github.com/cue-lang/cue/releases/).

These releases include *prereleases*, which are cutting-edge versions of `cue`
These releases include *pre-releases*, which are cutting-edge versions of `cue`
made available to help expose bugs and flush out unintended behaviours.

#### Install using Homebrew
Expand Down Expand Up @@ -64,16 +64,32 @@ docker pull cuelang/cue:latest

On
[platforms supported by Go](https://go.dev/dl/#stable),
`cue` can be installed from source using any of its released versions.
`cue` can be installed from source using any of its
release, pre-release, or as-yet-unreleased versions.
Installing from source requires that you already have
[Go](https://go.dev)
installed and available.

For example, to fetch the latest version:
For example, to fetch the `latest` version:

{{{with script "en" "go install"}}}
{{{with script "en" "go install cmd/cue@latest"}}}
#ellipsis 0
go install cuelang.org/go/cmd/cue@latest
{{{end}}}

This method requires that you already have [Go](https://go.dev) installed.
[This page](https://pkg.go.dev/cuelang.org/go?tab=versions)
lists the installable releases and pre-releases that you can specify instead of
`latest`.

You can also install the tip version of `cue` by specifying `master`:

{{{with script "en" "go install cmd/cue@master"}}}
#ellipsis 0
go install cuelang.org/go/cmd/cue@master
{{{end}}}

The capabilities of the tip version change frequently because it contains the
most recent, unreleased code.

#### Install on Arch Linux

Expand Down
12 changes: 10 additions & 2 deletions content/docs/introduction/installation/gen_cache.cue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package site
page: {
cache: {
multi_step: {
hash: "4U197E1I2R39EKP4IHSO167TRT6FC6JHP4SM61VDA1G7SGJS21L0===="
scriptHash: "D37M5I4CC9UQ54DHIBSQ5TTE5SQT8FQRIFIR5UV0EUS1PEIFG7QG===="
hash: "19N1V8ITQ91S79GFHPOHH0JFFSHP4QHTG9AQ12KP18S4QULGVJJ0===="
scriptHash: "T22RVEVNCSL1EBGJC1VB4CUC6NORBUOCAN65A6USMPUL369LHPLG===="
steps: [{
doc: ""
cmd: "export GOMODCACHE=/caches/gomodcache"
Expand All @@ -28,6 +28,14 @@ package site
"""
}, {
doc: "#ellipsis 0"
cmd: "go install cuelang.org/go/cmd/cue@master"
exitCode: 0
output: """
...
"""
}, {
doc: ""
cmd: "go mod init go.example"
exitCode: 0
Expand Down
24 changes: 20 additions & 4 deletions hugo/content/en/docs/introduction/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ that's appropriate for your operating system.
On Linux, Microsoft Windows, and macOS, the `cue` command can be downloaded from the
[official CUE releases](https://github.com/cue-lang/cue/releases/).

These releases include *prereleases*, which are cutting-edge versions of `cue`
These releases include *pre-releases*, which are cutting-edge versions of `cue`
made available to help expose bugs and flush out unintended behaviours.

#### Install using Homebrew
Expand Down Expand Up @@ -57,16 +57,32 @@ $ docker pull cuelang/cue:latest

On
[platforms supported by Go](https://go.dev/dl/#stable),
`cue` can be installed from source using any of its released versions.
`cue` can be installed from source using any of its
release, pre-release, or as-yet-unreleased versions.
Installing from source requires that you already have
[Go](https://go.dev)
installed and available.

For example, to fetch the latest version:
For example, to fetch the `latest` version:

```text { title="TERMINAL" type="terminal" codeToCopy="Z28gaW5zdGFsbCBjdWVsYW5nLm9yZy9nby9jbWQvY3VlQGxhdGVzdA==" }
$ go install cuelang.org/go/cmd/cue@latest
...
```

This method requires that you already have [Go](https://go.dev) installed.
[This page](https://pkg.go.dev/cuelang.org/go?tab=versions)
lists the installable releases and pre-releases that you can specify instead of
`latest`.

You can also install the tip version of `cue` by specifying `master`:

```text { title="TERMINAL" type="terminal" codeToCopy="Z28gaW5zdGFsbCBjdWVsYW5nLm9yZy9nby9jbWQvY3VlQG1hc3Rlcg==" }
$ go install cuelang.org/go/cmd/cue@master
...
```

The capabilities of the tip version change frequently because it contains the
most recent, unreleased code.

#### Install on Arch Linux

Expand Down

0 comments on commit 2b884cc

Please sign in to comment.