Skip to content

Commit

Permalink
doc: update building guide (notaryproject#563)
Browse files Browse the repository at this point in the history
Resolves notaryproject#562 
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao authored May 19, 2023
1 parent eb9e6ca commit c55aab0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ install: install-notation ## install the notation cli

.PHONY: install-notation
install-notation: bin/notation ## installs the notation cli
mkdir -p ~/bin
cp $< ~/bin/

.PHONY: install-docker-%
Expand Down
27 changes: 18 additions & 9 deletions building.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The notation repo contains the following:

- `notation` - A CLI for signing and verifying artifacts with Notation

Building above binaries require [golang](https://golang.org/dl/) with version `>= 1.17`.
Building above binaries require [golang](https://golang.org/dl/) with version `>= 1.20`.

## Windows with WSL
## Windows with WSL or Linux

- Build the binaries, installing them to:
- `~/bin/notation`
Expand All @@ -17,13 +17,22 @@ Building above binaries require [golang](https://golang.org/dl/) with version `>
```
- Verify binaries are installed
```sh
docker --help
# look for
Management Commands:
generate* Generate artifacts (CNCF Notary Project, 0.1.0)
notation* Manage signatures on Docker images (CNCF Notary Project, 0.5.3-alpha)
which notation
# output
# expected output
/home/<user>/bin/notation
```

If you confront `notation not found`, please add `~/bin/` to your $PATH:
```sh
PATH="$HOME/bin:$PATH"
```
If you would like to add the path permanently, add the command to your shell `profile`:
```sh
echo 'PATH="$HOME/bin:$PATH"' >> $profile_path
source $profile_path
```
The `profile_path` per shell:
- Bash: `~/.bash_profile` or `~/.profile`
- Zsh: `~/.zprofile`
- Ksh: `~/.profile`

0 comments on commit c55aab0

Please sign in to comment.