From 34ede59f7c591a6b316e006d0b1916572440031a Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:38:15 +1000 Subject: [PATCH 01/15] refactor(dir): remove init from package Signed-off-by: Jason --- dir/path.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dir/path.go b/dir/path.go index 28c1db4a..acfb6bac 100644 --- a/dir/path.go +++ b/dir/path.go @@ -79,10 +79,6 @@ const ( var userConfigDir = os.UserConfigDir // for unit test -func init() { - loadUserPath() -} - // loadUserPath function defines UserConfigDir and UserLibexecDir. func loadUserPath() { // set user config From 87a226428f6ae4b09e7e2a00b56fcd53b6bc34ea Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:40:38 +1000 Subject: [PATCH 02/15] refactor(dir): split loadUserPath into two functions Signed-off-by: Jason --- dir/path.go | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/dir/path.go b/dir/path.go index acfb6bac..9bf809c7 100644 --- a/dir/path.go +++ b/dir/path.go @@ -81,15 +81,32 @@ var userConfigDir = os.UserConfigDir // for unit test // loadUserPath function defines UserConfigDir and UserLibexecDir. func loadUserPath() { - // set user config - userDir, err := userConfigDir() - if err != nil { + UserConfigDir = "" + UserLibexecDir = "" + + _ = UserLibexecDirPath() +} + +// UserConfigDirPath returns the user level {NOTATION_CONFIG} path. +func UserConfigDirPath() string { + if UserConfigDir == "" { + userDir, err := userConfigDir() + if err != nil { panic(err) + } + // set user config + UserConfigDir = filepath.Join(userDir, notation) } - UserConfigDir = filepath.Join(userDir, notation) + return UserConfigDir +} - // set user libexec - UserLibexecDir = UserConfigDir +// UserLibexecDirPath returns the user level {NOTATION_LIBEXEC} path. +func UserLibexecDirPath() string { + if UserLibexecDir == "" { + // set user libexec + UserLibexecDir = UserConfigDirPath() + } + return UserLibexecDir } // LocalKeyPath returns the local key and local cert relative paths. From d6a685b3887ecf4bb5e17d0dc27fd740af704d54 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:41:06 +1000 Subject: [PATCH 03/15] fix(dir): remove panic and instead default to current directory Signed-off-by: Jason --- dir/path.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dir/path.go b/dir/path.go index 9bf809c7..35acfc7c 100644 --- a/dir/path.go +++ b/dir/path.go @@ -92,7 +92,8 @@ func UserConfigDirPath() string { if UserConfigDir == "" { userDir, err := userConfigDir() if err != nil { - panic(err) + // fallback to current directory + userDir = "." } // set user config UserConfigDir = filepath.Join(userDir, notation) From 7b829bd59d919c9d17980fc8c3ebe01646aa01fc Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:41:25 +1000 Subject: [PATCH 04/15] test(dir): add unit test for new functions Signed-off-by: Jason --- dir/path_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dir/path_test.go b/dir/path_test.go index f80b75c7..638966eb 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -35,6 +35,23 @@ func Test_loadPath(t *testing.T) { } } +func Test_UserConfigDirPath(t *testing.T) { + userConfigDir = mockGetUserConfig + got := UserConfigDirPath() + if got != "/path/notation" { + t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) + } +} + +func Test_UserLibexecDirPath(t *testing.T) { + userConfigDir = mockGetUserConfig + got := UserLibexecDirPath() + if got != "/path/notation" { + t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) + } +} + + func TestLocalKeyPath(t *testing.T) { userConfigDir = mockGetUserConfig loadUserPath() From a08bba75bc98f8d32923c2d5fb3f434681775e98 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:42:05 +1000 Subject: [PATCH 05/15] refactor(fs): use new functions for retrieving paths Signed-off-by: Jason --- dir/fs.go | 4 ++-- dir/fs_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dir/fs.go b/dir/fs.go index 4533a7a6..bd313dfe 100644 --- a/dir/fs.go +++ b/dir/fs.go @@ -51,10 +51,10 @@ func NewSysFS(root string) SysFS { // ConfigFS is the config SysFS func ConfigFS() SysFS { - return NewSysFS(UserConfigDir) + return NewSysFS(UserConfigDirPath()) } // PluginFS is the plugin SysFS func PluginFS() SysFS { - return NewSysFS(filepath.Join(UserLibexecDir, PathPlugins)) + return NewSysFS(filepath.Join(UserLibexecDirPath(), PathPlugins)) } diff --git a/dir/fs_test.go b/dir/fs_test.go index d2c976cf..bfa1adb6 100644 --- a/dir/fs_test.go +++ b/dir/fs_test.go @@ -67,7 +67,7 @@ func TestPluginFS(t *testing.T) { if err != nil { t.Fatalf("SysPath() failed. err = %v", err) } - if path != filepath.Join(UserLibexecDir, PathPlugins, "plugin") { - t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(UserLibexecDir, PathPlugins, "plugin")) + if path != filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin") { + t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin")) } } From aaa72ee1b317c4d6b0c29cb14390f0385b5ee246 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 18:59:40 +1000 Subject: [PATCH 06/15] test(dir): test unset HOME Signed-off-by: Jason --- dir/path_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dir/path_test.go b/dir/path_test.go index 638966eb..ffa20c01 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -43,6 +43,14 @@ func Test_UserConfigDirPath(t *testing.T) { } } +func Test_NoHomeVariable(t *testing.T) { + t.Setenv("HOME", "") + userConfigDir := UserConfigDirPath() + if userConfigDir != "notation" { + t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, userConfigDir) + } +} + func Test_UserLibexecDirPath(t *testing.T) { userConfigDir = mockGetUserConfig got := UserLibexecDirPath() @@ -51,7 +59,6 @@ func Test_UserLibexecDirPath(t *testing.T) { } } - func TestLocalKeyPath(t *testing.T) { userConfigDir = mockGetUserConfig loadUserPath() From 5e2e5f666276e069e81ea75966f3a0fcc4697419 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 2 Sep 2024 21:46:31 +1000 Subject: [PATCH 07/15] test(dir): fix failing unit test Signed-off-by: Jason --- dir/path_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dir/path_test.go b/dir/path_test.go index ffa20c01..b3ffc1a5 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -14,6 +14,7 @@ package dir import ( + "os" "path/filepath" "testing" ) @@ -45,9 +46,11 @@ func Test_UserConfigDirPath(t *testing.T) { func Test_NoHomeVariable(t *testing.T) { t.Setenv("HOME", "") - userConfigDir := UserConfigDirPath() - if userConfigDir != "notation" { - t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, userConfigDir) + UserConfigDir = "" + userConfigDir = os.UserConfigDir + got := UserConfigDirPath() + if got != "notation" { + t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir) } } From bbe79612c3bfb3826218a3a28d27dcf701c5d802 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 10:41:23 +1000 Subject: [PATCH 08/15] refactor(dir): convert function to be internal Signed-off-by: Jason --- dir/fs.go | 4 ++-- dir/fs_test.go | 4 ++-- dir/path.go | 12 ++++++------ dir/path_test.go | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dir/fs.go b/dir/fs.go index bd313dfe..444179ce 100644 --- a/dir/fs.go +++ b/dir/fs.go @@ -51,10 +51,10 @@ func NewSysFS(root string) SysFS { // ConfigFS is the config SysFS func ConfigFS() SysFS { - return NewSysFS(UserConfigDirPath()) + return NewSysFS(userConfigDirPath()) } // PluginFS is the plugin SysFS func PluginFS() SysFS { - return NewSysFS(filepath.Join(UserLibexecDirPath(), PathPlugins)) + return NewSysFS(filepath.Join(userLibexecDirPath(), PathPlugins)) } diff --git a/dir/fs_test.go b/dir/fs_test.go index bfa1adb6..6488e5de 100644 --- a/dir/fs_test.go +++ b/dir/fs_test.go @@ -67,7 +67,7 @@ func TestPluginFS(t *testing.T) { if err != nil { t.Fatalf("SysPath() failed. err = %v", err) } - if path != filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin") { - t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(UserLibexecDirPath(), PathPlugins, "plugin")) + if path != filepath.Join(userLibexecDirPath(), PathPlugins, "plugin") { + t.Fatalf(`SysPath() failed. got: %q, want: %q`, path, filepath.Join(userLibexecDirPath(), PathPlugins, "plugin")) } } diff --git a/dir/path.go b/dir/path.go index 35acfc7c..1345b4f6 100644 --- a/dir/path.go +++ b/dir/path.go @@ -84,11 +84,11 @@ func loadUserPath() { UserConfigDir = "" UserLibexecDir = "" - _ = UserLibexecDirPath() + _ = userLibexecDirPath() } -// UserConfigDirPath returns the user level {NOTATION_CONFIG} path. -func UserConfigDirPath() string { +// userConfigDirPath returns the user level {NOTATION_CONFIG} path. +func userConfigDirPath() string { if UserConfigDir == "" { userDir, err := userConfigDir() if err != nil { @@ -101,11 +101,11 @@ func UserConfigDirPath() string { return UserConfigDir } -// UserLibexecDirPath returns the user level {NOTATION_LIBEXEC} path. -func UserLibexecDirPath() string { +// userLibexecDirPath returns the user level {NOTATION_LIBEXEC} path. +func userLibexecDirPath() string { if UserLibexecDir == "" { // set user libexec - UserLibexecDir = UserConfigDirPath() + UserLibexecDir = userConfigDirPath() } return UserLibexecDir } diff --git a/dir/path_test.go b/dir/path_test.go index b3ffc1a5..59d9c7a3 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -38,7 +38,7 @@ func Test_loadPath(t *testing.T) { func Test_UserConfigDirPath(t *testing.T) { userConfigDir = mockGetUserConfig - got := UserConfigDirPath() + got := userConfigDirPath() if got != "/path/notation" { t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) } @@ -48,7 +48,7 @@ func Test_NoHomeVariable(t *testing.T) { t.Setenv("HOME", "") UserConfigDir = "" userConfigDir = os.UserConfigDir - got := UserConfigDirPath() + got := userConfigDirPath() if got != "notation" { t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir) } @@ -56,7 +56,7 @@ func Test_NoHomeVariable(t *testing.T) { func Test_UserLibexecDirPath(t *testing.T) { userConfigDir = mockGetUserConfig - got := UserLibexecDirPath() + got := userLibexecDirPath() if got != "/path/notation" { t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) } From 0f0e316d972bda241fa35775e18298051b1e9742 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 10:42:01 +1000 Subject: [PATCH 09/15] test(dir): unset XDG_CONFIG_HOME Signed-off-by: Jason --- dir/path_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dir/path_test.go b/dir/path_test.go index 59d9c7a3..a8b6f190 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -46,6 +46,7 @@ func Test_UserConfigDirPath(t *testing.T) { func Test_NoHomeVariable(t *testing.T) { t.Setenv("HOME", "") + t.Setenv("XDG_CONFIG_HOME", "") UserConfigDir = "" userConfigDir = os.UserConfigDir got := userConfigDirPath() From 290f0c34f8d08927554ef575301d318ae50eca1d Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 10:52:01 +1000 Subject: [PATCH 10/15] refactor(dir): remove loadUserPath func Signed-off-by: Jason --- dir/path.go | 8 -------- dir/path_test.go | 27 ++++++++++++--------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/dir/path.go b/dir/path.go index 1345b4f6..a667e97d 100644 --- a/dir/path.go +++ b/dir/path.go @@ -79,14 +79,6 @@ const ( var userConfigDir = os.UserConfigDir // for unit test -// loadUserPath function defines UserConfigDir and UserLibexecDir. -func loadUserPath() { - UserConfigDir = "" - UserLibexecDir = "" - - _ = userLibexecDirPath() -} - // userConfigDirPath returns the user level {NOTATION_CONFIG} path. func userConfigDirPath() string { if UserConfigDir == "" { diff --git a/dir/path_test.go b/dir/path_test.go index a8b6f190..06f4c6b0 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -15,7 +15,6 @@ package dir import ( "os" - "path/filepath" "testing" ) @@ -23,21 +22,14 @@ func mockGetUserConfig() (string, error) { return "/path/", nil } -func Test_loadPath(t *testing.T) { - wantDir := filepath.FromSlash("/path/notation") - userConfigDir = mockGetUserConfig - loadUserPath() - if UserConfigDir != wantDir { - t.Fatalf(`loadPath() UserConfigDir is incorrect. got: %q, want: %q`, UserConfigDir, wantDir) - } - - if UserLibexecDir != UserConfigDir { - t.Fatalf(`loadPath() UserLibexecDir is incorrect. got: %q, want: %q`, UserLibexecDir, wantDir) - } +func setup() { + UserConfigDir = "" + UserLibexecDir = "" } func Test_UserConfigDirPath(t *testing.T) { userConfigDir = mockGetUserConfig + setup() got := userConfigDirPath() if got != "/path/notation" { t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) @@ -47,7 +39,7 @@ func Test_UserConfigDirPath(t *testing.T) { func Test_NoHomeVariable(t *testing.T) { t.Setenv("HOME", "") t.Setenv("XDG_CONFIG_HOME", "") - UserConfigDir = "" + setup() userConfigDir = os.UserConfigDir got := userConfigDirPath() if got != "notation" { @@ -57,6 +49,7 @@ func Test_NoHomeVariable(t *testing.T) { func Test_UserLibexecDirPath(t *testing.T) { userConfigDir = mockGetUserConfig + setup() got := userLibexecDirPath() if got != "/path/notation" { t.Fatalf(`UserConfigDirPath() = %q, want "/path/notation"`, got) @@ -65,7 +58,9 @@ func Test_UserLibexecDirPath(t *testing.T) { func TestLocalKeyPath(t *testing.T) { userConfigDir = mockGetUserConfig - loadUserPath() + setup() + _ = userConfigDirPath() + _ = userLibexecDirPath() gotKeyPath, gotCertPath := LocalKeyPath("web") if gotKeyPath != "localkeys/web.key" { t.Fatalf(`LocalKeyPath() gotKeyPath = %q, want "localkeys/web.key"`, gotKeyPath) @@ -77,7 +72,9 @@ func TestLocalKeyPath(t *testing.T) { func TestX509TrustStoreDir(t *testing.T) { userConfigDir = mockGetUserConfig - loadUserPath() + setup() + _ = userConfigDirPath() + _ = userLibexecDirPath() if got := X509TrustStoreDir("ca", "web"); got != "truststore/x509/ca/web" { t.Fatalf(`X509TrustStoreDir() = %q, want "truststore/x509/ca/web"`, got) } From 7a10e72301613194e91d7ec4e7e5eb6d90193ea9 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 13:26:37 +1000 Subject: [PATCH 11/15] refactor(dir): set default directory to .notation Signed-off-by: Jason --- dir/path.go | 2 ++ dir/path_test.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dir/path.go b/dir/path.go index a667e97d..e6285fb9 100644 --- a/dir/path.go +++ b/dir/path.go @@ -86,6 +86,8 @@ func userConfigDirPath() string { if err != nil { // fallback to current directory userDir = "." + UserConfigDir = "." + notation + return UserConfigDir } // set user config UserConfigDir = filepath.Join(userDir, notation) diff --git a/dir/path_test.go b/dir/path_test.go index 06f4c6b0..ceeafc3f 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -42,8 +42,8 @@ func Test_NoHomeVariable(t *testing.T) { setup() userConfigDir = os.UserConfigDir got := userConfigDirPath() - if got != "notation" { - t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir) + if got != ".notation" { + t.Fatalf(`UserConfigDirPath() = %q, want ".notation"`, UserConfigDir) } } From 98f0fd2f4332205105686ca39b473e826e68a93a Mon Sep 17 00:00:00 2001 From: JasonTheDeveloper Date: Tue, 3 Sep 2024 13:27:59 +1000 Subject: [PATCH 12/15] refactor(dir): remove userDir Co-authored-by: Shiwei Zhang Signed-off-by: JasonTheDeveloper Signed-off-by: Jason --- dir/path.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dir/path.go b/dir/path.go index e6285fb9..17cc9c2f 100644 --- a/dir/path.go +++ b/dir/path.go @@ -85,7 +85,8 @@ func userConfigDirPath() string { userDir, err := userConfigDir() if err != nil { // fallback to current directory - userDir = "." + UserConfigDir = "." + notation + return UserConfigDir UserConfigDir = "." + notation return UserConfigDir } From e5b04e7a7faa5e0b607ea5382a8aa1609b34f445 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 13:29:19 +1000 Subject: [PATCH 13/15] refactor(dir): remove redundant code Signed-off-by: Jason --- dir/path.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/dir/path.go b/dir/path.go index 17cc9c2f..a08a9a24 100644 --- a/dir/path.go +++ b/dir/path.go @@ -87,8 +87,6 @@ func userConfigDirPath() string { // fallback to current directory UserConfigDir = "." + notation return UserConfigDir - UserConfigDir = "." + notation - return UserConfigDir } // set user config UserConfigDir = filepath.Join(userDir, notation) From 51acb0bfe2ac7d880fb449b444ba20c81dfb579f Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Wed, 4 Sep 2024 08:47:35 +0800 Subject: [PATCH 14/15] docs: create release checklist on main (#443) Signed-off-by: Patrick Zheng Signed-off-by: Jason --- RELEASE_CHECKLIST.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 RELEASE_CHECKLIST.md diff --git a/RELEASE_CHECKLIST.md b/RELEASE_CHECKLIST.md new file mode 100644 index 00000000..3d01ee85 --- /dev/null +++ b/RELEASE_CHECKLIST.md @@ -0,0 +1,36 @@ +# Release Checklist + +## Overview + +This document describes the checklist to publish a release for notation-go. + +## Release Process from main + +1. Check if there are any security vulnerabilities fixed and security advisories published before a release. Security advisories should be linked on the release notes. +2. Determine a [SemVer2](https://semver.org/)-valid version prefixed with the letter `v` for release. For example, `version="v1.0.0-rc.1"`. +3. If there is new release in [notation-core-go](https://github.com/notaryproject/notation-core-go) library that are required to be upgraded in notation-go, update the dependency versions in the follow `go.mod` and `go.sum` files of notation-go: + - [go.mod](go.mod), [go.sum](go.sum) +4. Open a bump up PR and submit the changes in step 3 to the notation-go repository. +5. After PR from step 4 is merged. Create another PR to update the value of `signingAgent` defined in file [signer/signer.go](signer/signer.go) with `notation-go/`, where `` is `$version` from step 2 without the `v` prefix. For example, `notation-go/1.0.0-rc.1`. The commit message MUST follow the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) and could be `bump: release $version`. Record the digest of that commit as ``. This PR is also used for voting purpose of the new release. Add the link of change logs and repo-level maintainer list in the PR's description. The PR title could be `bump: release $version`. Make sure to reach a majority of approvals from the [repo-level maintainers](MAINTAINERS) before merging it. This PR MUST be merged using [Create a merge commit](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github) method in GitHub. +6. After the voting PR is merged, execute `git clone https://github.com/notaryproject/notation-go.git` to clone the repository to your local file system. +7. Enter the cloned repository and execute `git checkout ` to switch to the specified branch based on the voting result. +8. Create a tag by running `git tag -am $version $version -s`. +9. Run `git tag` and ensure the desired tag name in the list looks correct, then push the new tag directly to the repository by running `git push origin $version`. +10. On notation-go GitHub page, goto [Tags](https://github.com/notaryproject/notation-go/tags). Your newly pushed tag should be shown on the top. Create a new release from the tag. Generate the release notes, revise the release description and change logs, and publish the release. +11. Announce the new release in the Notary Project community. + +## Release Process from a release branch + +1. Check if there are any security vulnerabilities fixed and security advisories published before a release. Security advisories should be linked on the release notes. +2. Determine a [SemVer2](https://semver.org/)-valid version prefixed with the letter `v` for release. For example, `version="v1.2.0-rc.1"`. +3. If a new release branch is needed, from main branch's [commit list](https://github.com/notaryproject/notation-go/commits/main/), find the commit that you want to cut the release. Click `<>` (Browse repository at this point). Create branch with name `release-` from the commit, where `` is `$version` from step 2 with the major and minor versions only. For example `release-1.2`. If the release branch already exists, skip this step. +4. If there is new release in [notation-core-go](https://github.com/notaryproject/notation-core-go) library that are required to be upgraded in notation-go, update the dependency versions in the follow `go.mod` and `go.sum` files of notation-go: + - [go.mod](go.mod), [go.sum](go.sum) +5. Open a bump up PR and submit the changes in step 4 to the release branch. +6. After PR from step 5 is merged. Create another PR to update the value of `signingAgent` defined in file `signer/signer.go` with `notation-go/`, where `` is `$version` from step 2 without the `v` prefix. For example, `notation-go/1.2.0-rc.1`. The commit message MUST follow the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) and could be `bump: release $version`. Record the digest of that commit as ``. This PR is also used for voting purpose of the new release. Add the link of change logs and repo-level maintainer list in the PR's description. The PR title could be `bump: release $version`. Make sure to reach a majority of approvals from the [repo-level maintainers](MAINTAINERS) before merging it. This PR MUST be merged using [Create a merge commit](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github) method in GitHub. +7. After the voting PR is merged, execute `git clone https://github.com/notaryproject/notation-go.git` to clone the repository to your local file system. +8. Enter the cloned repository and execute `git checkout ` to switch to the specified branch based on the voting result. +9. Create a tag by running `git tag -am $version $version -s`. +10. Run `git tag` and ensure the desired tag name in the list looks correct, then push the new tag directly to the repository by running `git push origin $version`. +11. On notation-go GitHub page, goto [Tags](https://github.com/notaryproject/notation-go/tags). Your newly pushed tag should be shown on the top. Create a new release from the tag. Generate the release notes, revise the release description and change logs, and publish the release. +12. Announce the new release in the Notary Project community. \ No newline at end of file From ff67f65b3f38588e7c92c92b99d043019063d6a7 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Wed, 4 Sep 2024 08:59:43 +0800 Subject: [PATCH 15/15] bump: bump up notation-core-go and signingAgent (#444) This PR targets on main branch. --------- Signed-off-by: Patrick Zheng Signed-off-by: Jason --- go.mod | 2 +- go.sum | 4 ++-- signer/signer.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index a6f33878..95643b71 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/go-ldap/ldap/v3 v3.4.8 - github.com/notaryproject/notation-core-go v1.1.0-rc.1.0.20240827000648-55e356868754 + github.com/notaryproject/notation-core-go v1.1.0 github.com/notaryproject/notation-plugin-framework-go v1.0.0 github.com/notaryproject/tspclient-go v0.2.0 github.com/opencontainers/go-digest v1.0.0 diff --git a/go.sum b/go.sum index c44e3a49..88ac20c7 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= -github.com/notaryproject/notation-core-go v1.1.0-rc.1.0.20240827000648-55e356868754 h1:Tal71cZxX1uDryBggNN+A+l0s0tVYDprn0OkIeG6mZk= -github.com/notaryproject/notation-core-go v1.1.0-rc.1.0.20240827000648-55e356868754/go.mod h1:+6AOh41JPrnVLbW/19SJqdhVHwKgIINBO/np0e7nXJA= +github.com/notaryproject/notation-core-go v1.1.0 h1:xCybcONOKcCyPNihJUSa+jRNsyQFNkrk0eJVVs1kWeg= +github.com/notaryproject/notation-core-go v1.1.0/go.mod h1:+6AOh41JPrnVLbW/19SJqdhVHwKgIINBO/np0e7nXJA= github.com/notaryproject/notation-plugin-framework-go v1.0.0 h1:6Qzr7DGXoCgXEQN+1gTZWuJAZvxh3p8Lryjn5FaLzi4= github.com/notaryproject/notation-plugin-framework-go v1.0.0/go.mod h1:RqWSrTOtEASCrGOEffq0n8pSg2KOgKYiWqFWczRSics= github.com/notaryproject/tspclient-go v0.2.0 h1:g/KpQGmyk/h7j60irIRG1mfWnibNOzJ8WhLqAzuiQAQ= diff --git a/signer/signer.go b/signer/signer.go index 4bd995cd..740a5dab 100644 --- a/signer/signer.go +++ b/signer/signer.go @@ -34,7 +34,7 @@ import ( ) // signingAgent is the unprotected header field used by signature. -const signingAgent = "Notation/1.0.0" +const signingAgent = "notation-go/1.3.0+unreleased" // GenericSigner implements notation.Signer and embeds signature.Signer type GenericSigner struct {