INSTALL.md: Note advantage of build.sh --install over go install

This commit is contained in:
Anmol Sethi 2022-12-06 00:31:36 -08:00
parent 030f95441d
commit 25e9be5fde
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA
2 changed files with 11 additions and 0 deletions

View file

@ -104,6 +104,9 @@ Or if you have Go installed you can install from source though you won't get the
go install oss.terrastruct.com/d2@latest
```
You can also install a release from source which will include manpages.
See [./docs/INSTALL.md#source-release](./docs/INSTALL.md#source-release).
To uninstall with the install script:
```sh

View file

@ -10,6 +10,7 @@ You may install `d2` through any of the following methods.
- <a href="#manual" id="toc-manual">Manual</a>
- <a href="#prefix" id="toc-prefix">PREFIX</a>
- <a href="#from-source" id="toc-from-source">From source</a>
- <a href="#source-release" id="toc-source-release">Source Release</a>
- <a href="#coming-soon" id="toc-coming-soon">Coming soon</a>
## install.sh
@ -134,6 +135,8 @@ You can always install from source:
go install oss.terrastruct.com/d2@latest
```
### Source Release
To install a proper release from source clone the repository and then:
```sh
@ -142,6 +145,11 @@ To install a proper release from source clone the repository and then:
# ./ci/release/build.sh --uninstall
```
Installing a real release will also install manpages and in the future other assets like
fonts and icons. Furthermore, when installing a non versioned commit, installing a proper
release will ensure that `d2 --version` works correctly by embedding the commit hash into
the `d2` binary.
## Coming soon
- Docker image