From 2b884cc2e7bf459cbda6e02ec459c8ccc12bc5c4 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Thu, 5 Sep 2024 08:51:22 +0100 Subject: [PATCH] docs/introduction: flesh out instructions on installing from source Preview-Path: /docs/introduction/installation Signed-off-by: Paul Jolly Change-Id: I901abb9703b8098ced5e9291bea460740fc4effd --- content/docs/introduction/installation/en.md | 26 +++++++++++++++---- .../introduction/installation/gen_cache.cue | 12 +++++++-- .../docs/introduction/installation/index.md | 24 ++++++++++++++--- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/content/docs/introduction/installation/en.md b/content/docs/introduction/installation/en.md index 83f2e782b..2528ebb4c 100644 --- a/content/docs/introduction/installation/en.md +++ b/content/docs/introduction/installation/en.md @@ -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 @@ -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 diff --git a/content/docs/introduction/installation/gen_cache.cue b/content/docs/introduction/installation/gen_cache.cue index d981e66bf..0f4660a91 100644 --- a/content/docs/introduction/installation/gen_cache.cue +++ b/content/docs/introduction/installation/gen_cache.cue @@ -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" @@ -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 diff --git a/hugo/content/en/docs/introduction/installation/index.md b/hugo/content/en/docs/introduction/installation/index.md index a14346548..7489ea3d1 100644 --- a/hugo/content/en/docs/introduction/installation/index.md +++ b/hugo/content/en/docs/introduction/installation/index.md @@ -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 @@ -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