mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
docs: Replace go get
with go install
for command installation (#9098)
`go get` is deprecated for installation of commands as of go v1.17 Ref: https://go.googlesource.com/go/+/ced0fdbad0655d63d535390b1a7126fd1fef8348 Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
This commit is contained in:
parent
cc55e57c1b
commit
16b8911b1a
|
@ -63,10 +63,10 @@ installed in order to build the frontend assets.
|
||||||
You can directly use the `go` tool to download and install the `prometheus`
|
You can directly use the `go` tool to download and install the `prometheus`
|
||||||
and `promtool` binaries into your `GOPATH`:
|
and `promtool` binaries into your `GOPATH`:
|
||||||
|
|
||||||
$ GO111MODULE=on go get github.com/prometheus/prometheus/cmd/...
|
$ GO111MODULE=on go install github.com/prometheus/prometheus/cmd/...
|
||||||
$ prometheus --config.file=your_config.yml
|
$ prometheus --config.file=your_config.yml
|
||||||
|
|
||||||
*However*, when using `go get` to build Prometheus, Prometheus will expect to be able to
|
*However*, when using `go install` to build Prometheus, Prometheus will expect to be able to
|
||||||
read its web assets from local filesystem directories under `web/ui/static` and
|
read its web assets from local filesystem directories under `web/ui/static` and
|
||||||
`web/ui/templates`. In order for these assets to be found, you will have to run Prometheus
|
`web/ui/templates`. In order for these assets to be found, you will have to run Prometheus
|
||||||
from the root of the cloned repository. Note also that these directories do not include the
|
from the root of the cloned repository. Note also that these directories do not include the
|
||||||
|
|
|
@ -9,9 +9,9 @@ and dashboards for Prometheus.
|
||||||
To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you
|
To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you
|
||||||
have a working Go development environment, it's easiest to run the following:
|
have a working Go development environment, it's easiest to run the following:
|
||||||
```bash
|
```bash
|
||||||
$ go get github.com/google/go-jsonnet/cmd/jsonnet
|
$ go install github.com/google/go-jsonnet/cmd/jsonnet@latest
|
||||||
$ go get github.com/google/go-jsonnet/cmd/jsonnetfmt
|
$ go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
|
||||||
$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
|
$ go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
_Note: The make targets `lint` and `fmt` need the `jsonnetfmt` binary, which is
|
_Note: The make targets `lint` and `fmt` need the `jsonnetfmt` binary, which is
|
||||||
|
|
|
@ -15,7 +15,7 @@ if ! [[ $(protoc --version) =~ "3.15.8" ]]; then
|
||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Since we run go get, go mod download, the go.sum will change.
|
# Since we run go install, go mod download, the go.sum will change.
|
||||||
# Make a backup.
|
# Make a backup.
|
||||||
cp go.sum go.sum.bak
|
cp go.sum go.sum.bak
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue