From 7f0500fb633c2dd8205c0bb0aaa60414ec9f2401 Mon Sep 17 00:00:00 2001 From: Junjie Gao Date: Tue, 21 Mar 2023 19:21:55 +0800 Subject: [PATCH 1/2] doc: update building guide Signed-off-by: Junjie Gao --- Makefile | 1 + building.md | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8cb73b83d..1cf323569 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,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-% diff --git a/building.md b/building.md index d1f07137f..bc767acf7 100644 --- a/building.md +++ b/building.md @@ -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` @@ -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//bin/notation ``` + + If you confront `notation not found`, please add `~/bin/` to your $PATH: + ```sh + export PATH="$HOME/bin:$PATH" + ``` + If you would like to add the path permanently, add the command to your Bash `~/.profile` file: + ```sh + echo 'export PATH="$HOME/bin:$PATH"' >> ~/.profile + source ~/.profile + ``` + For other shells, please add the command to the corresponding `profile` file. + - Bash: ~/.bash_profile or ~/.profile + - Zsh: ~/.zprofile + - Ksh: ~/.profile + From b298972322ebce407d979f64805aafbb31334cc7 Mon Sep 17 00:00:00 2001 From: Junjie Gao Date: Thu, 27 Apr 2023 10:22:03 +0800 Subject: [PATCH 2/2] fix: update doc Signed-off-by: Junjie Gao --- building.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/building.md b/building.md index bc767acf7..44109c632 100644 --- a/building.md +++ b/building.md @@ -24,15 +24,15 @@ Building above binaries require [golang](https://golang.org/dl/) with version `> If you confront `notation not found`, please add `~/bin/` to your $PATH: ```sh - export PATH="$HOME/bin:$PATH" + PATH="$HOME/bin:$PATH" ``` - If you would like to add the path permanently, add the command to your Bash `~/.profile` file: + If you would like to add the path permanently, add the command to your shell `profile`: ```sh - echo 'export PATH="$HOME/bin:$PATH"' >> ~/.profile - source ~/.profile + echo 'PATH="$HOME/bin:$PATH"' >> $profile_path + source $profile_path ``` - For other shells, please add the command to the corresponding `profile` file. - - Bash: ~/.bash_profile or ~/.profile - - Zsh: ~/.zprofile - - Ksh: ~/.profile + The `profile_path` per shell: + - Bash: `~/.bash_profile` or `~/.profile` + - Zsh: `~/.zprofile` + - Ksh: `~/.profile`