diff --git a/Makefile b/Makefile index d564cc54d..a2e8fe596 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -MODULE = github.com/notaryproject/notation +MODULE = github.com/notaryproject/notation/v2 COMMANDS = notation GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null) GIT_COMMIT = $(shell git rev-parse HEAD) @@ -22,7 +22,7 @@ ifndef BUILD_METADATA endif ifneq ($(GIT_TAG),) - BUILD_METADATA := + BUILD_METADATA := endif # set flags @@ -68,7 +68,7 @@ e2e-covdata: export GOCOVERDIR=$(CURDIR)/test/e2e/.cover; \ rm -rf $$GOCOVERDIR; \ mkdir -p $$GOCOVERDIR; \ - export GO_INSTRUMENT_FLAGS='-coverpkg "github.com/notaryproject/notation/internal/...,github.com/notaryproject/notation/pkg/...,github.com/notaryproject/notation/cmd/..."'; \ + export GO_INSTRUMENT_FLAGS='-coverpkg "github.com/notaryproject/notation/v2/internal/...,github.com/notaryproject/notation/v2/cmd/..."'; \ $(MAKE) e2e && go tool covdata textfmt -i=$$GOCOVERDIR -o "$(CURDIR)/test/e2e/coverage.txt" .PHONY: clean diff --git a/cmd/notation/blob/cmd.go b/cmd/notation/blob/cmd.go index b1b60b72f..945a3b7d7 100644 --- a/cmd/notation/blob/cmd.go +++ b/cmd/notation/blob/cmd.go @@ -15,7 +15,7 @@ package blob import ( - "github.com/notaryproject/notation/cmd/notation/blob/policy" + "github.com/notaryproject/notation/v2/cmd/notation/blob/policy" "github.com/spf13/cobra" ) diff --git a/cmd/notation/blob/inspect.go b/cmd/notation/blob/inspect.go index d1527e171..7fd0ad21f 100644 --- a/cmd/notation/blob/inspect.go +++ b/cmd/notation/blob/inspect.go @@ -19,9 +19,9 @@ import ( "os" "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" "github.com/spf13/cobra" ) diff --git a/cmd/notation/blob/policy/import.go b/cmd/notation/blob/policy/import.go index 8d0b1f34b..f132fa9f6 100644 --- a/cmd/notation/blob/policy/import.go +++ b/cmd/notation/blob/policy/import.go @@ -20,8 +20,8 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/verifier/trustpolicy" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" ) diff --git a/cmd/notation/blob/policy/init.go b/cmd/notation/blob/policy/init.go index 27e50d487..82f245303 100644 --- a/cmd/notation/blob/policy/init.go +++ b/cmd/notation/blob/policy/init.go @@ -20,9 +20,9 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/verifier/trustpolicy" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" ) diff --git a/cmd/notation/blob/sign.go b/cmd/notation/blob/sign.go index 988a43d55..058b02752 100644 --- a/cmd/notation/blob/sign.go +++ b/cmd/notation/blob/sign.go @@ -25,14 +25,14 @@ import ( "github.com/notaryproject/notation-core-go/revocation/purpose" "github.com/notaryproject/notation-go" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/sign" - "github.com/notaryproject/notation/internal/envelope" - "github.com/notaryproject/notation/internal/httputil" - "github.com/notaryproject/notation/internal/osutil" - clirev "github.com/notaryproject/notation/internal/revocation" - nx509 "github.com/notaryproject/notation/internal/x509" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/sign" + "github.com/notaryproject/notation/v2/internal/envelope" + "github.com/notaryproject/notation/v2/internal/httputil" + "github.com/notaryproject/notation/v2/internal/osutil" + clirev "github.com/notaryproject/notation/v2/internal/revocation" + nx509 "github.com/notaryproject/notation/v2/internal/x509" "github.com/notaryproject/tspclient-go" "github.com/spf13/cobra" ) diff --git a/cmd/notation/blob/sign_test.go b/cmd/notation/blob/sign_test.go index e139095b6..3d7e25073 100644 --- a/cmd/notation/blob/sign_test.go +++ b/cmd/notation/blob/sign_test.go @@ -19,8 +19,8 @@ import ( "testing" "time" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/internal/envelope" ) func TestBlobSignCommand_BasicArgs(t *testing.T) { diff --git a/cmd/notation/blob/verify.go b/cmd/notation/blob/verify.go index 367563a7c..831182bce 100644 --- a/cmd/notation/blob/verify.go +++ b/cmd/notation/blob/verify.go @@ -21,11 +21,11 @@ import ( "strings" "github.com/notaryproject/notation-go" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/verify" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/verify" + "github.com/notaryproject/notation/v2/internal/envelope" "github.com/spf13/cobra" ) diff --git a/cmd/notation/cert/add.go b/cmd/notation/cert/add.go index c4d489d31..820212c67 100644 --- a/cmd/notation/cert/add.go +++ b/cmd/notation/cert/add.go @@ -17,7 +17,7 @@ import ( "errors" "fmt" - "github.com/notaryproject/notation/cmd/notation/internal/truststore" + "github.com/notaryproject/notation/v2/cmd/notation/internal/truststore" "github.com/spf13/cobra" ) diff --git a/cmd/notation/cert/delete.go b/cmd/notation/cert/delete.go index 044f240c0..68a745a52 100644 --- a/cmd/notation/cert/delete.go +++ b/cmd/notation/cert/delete.go @@ -17,7 +17,7 @@ import ( "errors" "fmt" - "github.com/notaryproject/notation/cmd/notation/internal/truststore" + "github.com/notaryproject/notation/v2/cmd/notation/internal/truststore" "github.com/spf13/cobra" ) diff --git a/cmd/notation/cert/generateTest.go b/cmd/notation/cert/generateTest.go index defe370da..45b320548 100644 --- a/cmd/notation/cert/generateTest.go +++ b/cmd/notation/cert/generateTest.go @@ -25,8 +25,8 @@ import ( "github.com/notaryproject/notation-core-go/testhelper" "github.com/notaryproject/notation-go/config" "github.com/notaryproject/notation-go/dir" - "github.com/notaryproject/notation/cmd/notation/internal/truststore" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/truststore" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/notation/cert/list.go b/cmd/notation/cert/list.go index 2359342b2..409b9da83 100644 --- a/cmd/notation/cert/list.go +++ b/cmd/notation/cert/list.go @@ -24,8 +24,8 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/log" notationgoTruststore "github.com/notaryproject/notation-go/verifier/truststore" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/truststore" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/truststore" "github.com/spf13/cobra" ) diff --git a/cmd/notation/cert/show.go b/cmd/notation/cert/show.go index 263b04ef0..df1537ff5 100644 --- a/cmd/notation/cert/show.go +++ b/cmd/notation/cert/show.go @@ -21,8 +21,8 @@ import ( corex509 "github.com/notaryproject/notation-core-go/x509" "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/truststore" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/truststore" "github.com/spf13/cobra" ) diff --git a/cmd/notation/inspect.go b/cmd/notation/inspect.go index fd7224868..d25e21443 100644 --- a/cmd/notation/inspect.go +++ b/cmd/notation/inspect.go @@ -19,10 +19,10 @@ import ( "os" "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - cmderr "github.com/notaryproject/notation/cmd/notation/internal/errors" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + cmderr "github.com/notaryproject/notation/v2/cmd/notation/internal/errors" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/spf13/cobra" ) diff --git a/cmd/notation/inspect_test.go b/cmd/notation/inspect_test.go index 4fa038bc5..82dae8e5c 100644 --- a/cmd/notation/inspect_test.go +++ b/cmd/notation/inspect_test.go @@ -17,8 +17,8 @@ import ( "reflect" "testing" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" "github.com/spf13/pflag" ) diff --git a/cmd/notation/internal/display/handler.go b/cmd/notation/internal/display/handler.go index 57bf65e42..3a964a53d 100644 --- a/cmd/notation/internal/display/handler.go +++ b/cmd/notation/internal/display/handler.go @@ -16,11 +16,11 @@ package display import ( "fmt" - "github.com/notaryproject/notation/cmd/notation/internal/display/metadata" - "github.com/notaryproject/notation/cmd/notation/internal/display/metadata/json" - "github.com/notaryproject/notation/cmd/notation/internal/display/metadata/text" - "github.com/notaryproject/notation/cmd/notation/internal/display/metadata/tree" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/metadata" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/metadata/json" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/metadata/text" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/metadata/tree" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // NewInspectHandler creates a new metadata InspectHandler based on the output diff --git a/cmd/notation/internal/display/metadata/json/blob_inspect.go b/cmd/notation/internal/display/metadata/json/blob_inspect.go index a1624eaf9..eb595772e 100644 --- a/cmd/notation/internal/display/metadata/json/blob_inspect.go +++ b/cmd/notation/internal/display/metadata/json/blob_inspect.go @@ -15,7 +15,7 @@ package json import ( coresignature "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // BlobInspectHandler is a handler for inspecting metadata information and diff --git a/cmd/notation/internal/display/metadata/json/inspect.go b/cmd/notation/internal/display/metadata/json/inspect.go index 2adca97f1..3a710b2c4 100644 --- a/cmd/notation/internal/display/metadata/json/inspect.go +++ b/cmd/notation/internal/display/metadata/json/inspect.go @@ -15,7 +15,7 @@ package json import ( coresignature "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/json/inspect_helper.go b/cmd/notation/internal/display/metadata/json/inspect_helper.go index 375e536a6..81cc4caac 100644 --- a/cmd/notation/internal/display/metadata/json/inspect_helper.go +++ b/cmd/notation/internal/display/metadata/json/inspect_helper.go @@ -23,7 +23,7 @@ import ( coresignature "github.com/notaryproject/notation-core-go/signature" "github.com/notaryproject/notation-go/plugin/proto" - envelopeutil "github.com/notaryproject/notation/internal/envelope" + envelopeutil "github.com/notaryproject/notation/v2/internal/envelope" "github.com/notaryproject/tspclient-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/text/blobverify.go b/cmd/notation/internal/display/metadata/text/blobverify.go index 6160b3865..6e7858fe6 100644 --- a/cmd/notation/internal/display/metadata/text/blobverify.go +++ b/cmd/notation/internal/display/metadata/text/blobverify.go @@ -15,7 +15,7 @@ package text import ( "github.com/notaryproject/notation-go" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // BlobVerifyHandler is a handler for rendering output for blob verify command diff --git a/cmd/notation/internal/display/metadata/text/verify.go b/cmd/notation/internal/display/metadata/text/verify.go index 743e17d4a..762e1310a 100644 --- a/cmd/notation/internal/display/metadata/text/verify.go +++ b/cmd/notation/internal/display/metadata/text/verify.go @@ -15,7 +15,7 @@ package text import ( "github.com/notaryproject/notation-go" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // VerifyHandler is a handler for rendering output for verify command in diff --git a/cmd/notation/internal/display/metadata/text/verify_helper.go b/cmd/notation/internal/display/metadata/text/verify_helper.go index 2e5571648..499adcc80 100644 --- a/cmd/notation/internal/display/metadata/text/verify_helper.go +++ b/cmd/notation/internal/display/metadata/text/verify_helper.go @@ -22,7 +22,7 @@ import ( "github.com/notaryproject/notation-go" "github.com/notaryproject/notation-go/verifier/trustpolicy" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // printVerificationSuccess prints out messages when verification succeeds diff --git a/cmd/notation/internal/display/metadata/text/verify_helper_test.go b/cmd/notation/internal/display/metadata/text/verify_helper_test.go index ce5abf7fe..3cdbb048a 100644 --- a/cmd/notation/internal/display/metadata/text/verify_helper_test.go +++ b/cmd/notation/internal/display/metadata/text/verify_helper_test.go @@ -20,8 +20,8 @@ import ( "github.com/notaryproject/notation-core-go/signature" "github.com/notaryproject/notation-go" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/internal/envelope" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/tree/blob_inspect.go b/cmd/notation/internal/display/metadata/tree/blob_inspect.go index 8acb6a8c7..758e704be 100644 --- a/cmd/notation/internal/display/metadata/tree/blob_inspect.go +++ b/cmd/notation/internal/display/metadata/tree/blob_inspect.go @@ -15,7 +15,7 @@ package tree import ( "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ) // BlobInspectHandler is a handler for inspecting metadata information and diff --git a/cmd/notation/internal/display/metadata/tree/inspect.go b/cmd/notation/internal/display/metadata/tree/inspect.go index 78e77828c..3b0f7294d 100644 --- a/cmd/notation/internal/display/metadata/tree/inspect.go +++ b/cmd/notation/internal/display/metadata/tree/inspect.go @@ -16,7 +16,7 @@ package tree import ( coresignature "github.com/notaryproject/notation-core-go/signature" "github.com/notaryproject/notation-go/registry" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/tree/inspect_helper.go b/cmd/notation/internal/display/metadata/tree/inspect_helper.go index beb88a071..cbdaa6ab1 100644 --- a/cmd/notation/internal/display/metadata/tree/inspect_helper.go +++ b/cmd/notation/internal/display/metadata/tree/inspect_helper.go @@ -26,7 +26,7 @@ import ( coresignature "github.com/notaryproject/notation-core-go/signature" "github.com/notaryproject/notation-go/plugin/proto" - envelopeutil "github.com/notaryproject/notation/internal/envelope" + envelopeutil "github.com/notaryproject/notation/v2/internal/envelope" "github.com/notaryproject/tspclient-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/tree/inspect_test.go b/cmd/notation/internal/display/metadata/tree/inspect_test.go index 17eff4790..d08c82ed2 100644 --- a/cmd/notation/internal/display/metadata/tree/inspect_test.go +++ b/cmd/notation/internal/display/metadata/tree/inspect_test.go @@ -18,7 +18,7 @@ import ( "testing" coresignature "github.com/notaryproject/notation-core-go/signature" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/display/metadata/tree/list.go b/cmd/notation/internal/display/metadata/tree/list.go index 871d0ca48..bd7e81e48 100644 --- a/cmd/notation/internal/display/metadata/tree/list.go +++ b/cmd/notation/internal/display/metadata/tree/list.go @@ -15,7 +15,7 @@ package tree import ( notationregistry "github.com/notaryproject/notation-go/registry" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/cmd/notation/internal/flag/flags.go b/cmd/notation/internal/flag/flags.go index 4a138e38c..f24c28be3 100644 --- a/cmd/notation/internal/flag/flags.go +++ b/cmd/notation/internal/flag/flags.go @@ -19,8 +19,8 @@ import ( "strings" "time" - "github.com/notaryproject/notation/internal/config" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/internal/config" + "github.com/notaryproject/notation/v2/internal/envelope" "github.com/spf13/pflag" ) diff --git a/cmd/notation/internal/flag/options.go b/cmd/notation/internal/flag/options.go index 53db0c011..44cec099e 100644 --- a/cmd/notation/internal/flag/options.go +++ b/cmd/notation/internal/flag/options.go @@ -21,8 +21,8 @@ import ( "strings" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/internal/trace" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/internal/trace" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/notation/internal/plugin/plugin.go b/cmd/notation/internal/plugin/plugin.go index 078f66ea3..1bcdec693 100644 --- a/cmd/notation/internal/plugin/plugin.go +++ b/cmd/notation/internal/plugin/plugin.go @@ -20,7 +20,7 @@ import ( "net/http" "time" - "github.com/notaryproject/notation/internal/httputil" + "github.com/notaryproject/notation/v2/internal/httputil" ) // MaxPluginSourceBytes specifies the limit on how many bytes are allowed in the diff --git a/cmd/notation/internal/sign/sign.go b/cmd/notation/internal/sign/sign.go index a3a3c011b..5dbecc166 100644 --- a/cmd/notation/internal/sign/sign.go +++ b/cmd/notation/internal/sign/sign.go @@ -23,7 +23,7 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/plugin" "github.com/notaryproject/notation-go/signer" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) // Signer is embedded with notation.BlobSigner and notation.Signer. diff --git a/cmd/notation/internal/sign/sign_test.go b/cmd/notation/internal/sign/sign_test.go index fc367becf..24a2a45c1 100644 --- a/cmd/notation/internal/sign/sign_test.go +++ b/cmd/notation/internal/sign/sign_test.go @@ -21,7 +21,7 @@ import ( "github.com/notaryproject/notation-go" "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/signer" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) func TestGenericSignerImpl(t *testing.T) { diff --git a/cmd/notation/internal/truststore/truststore.go b/cmd/notation/internal/truststore/truststore.go index 5eb13ac22..2d4e07323 100644 --- a/cmd/notation/internal/truststore/truststore.go +++ b/cmd/notation/internal/truststore/truststore.go @@ -28,8 +28,8 @@ import ( corex509 "github.com/notaryproject/notation-core-go/x509" "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/verifier/truststore" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/internal/osutil" ) // AddCert adds a single cert file at path to the trust store diff --git a/cmd/notation/internal/verify/verify.go b/cmd/notation/internal/verify/verify.go index 6fc4a3457..95f70c6ce 100644 --- a/cmd/notation/internal/verify/verify.go +++ b/cmd/notation/internal/verify/verify.go @@ -28,7 +28,7 @@ import ( "github.com/notaryproject/notation-go/verifier/trustpolicy" "github.com/notaryproject/notation-go/verifier/truststore" - clirev "github.com/notaryproject/notation/internal/revocation" + clirev "github.com/notaryproject/notation/v2/internal/revocation" ) // Verifier is embedded with notation.BlobVerifier and notation.Verifier. diff --git a/cmd/notation/key.go b/cmd/notation/key.go index 20eaa4d23..1b3309b8a 100644 --- a/cmd/notation/key.go +++ b/cmd/notation/key.go @@ -23,7 +23,7 @@ import ( "github.com/notaryproject/notation-go/config" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/notation/list.go b/cmd/notation/list.go index d586666f1..bec142f22 100644 --- a/cmd/notation/list.go +++ b/cmd/notation/list.go @@ -19,11 +19,11 @@ import ( "fmt" notationregistry "github.com/notaryproject/notation-go/registry" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - cmderr "github.com/notaryproject/notation/cmd/notation/internal/errors" - "github.com/notaryproject/notation/cmd/notation/internal/experimental" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + cmderr "github.com/notaryproject/notation/v2/cmd/notation/internal/errors" + "github.com/notaryproject/notation/v2/cmd/notation/internal/experimental" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/spf13/cobra" ) diff --git a/cmd/notation/list_test.go b/cmd/notation/list_test.go index b47cad67b..a334c8fab 100644 --- a/cmd/notation/list_test.go +++ b/cmd/notation/list_test.go @@ -16,7 +16,7 @@ package main import ( "testing" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) func TestListCommand_SecretsFromArgs(t *testing.T) { diff --git a/cmd/notation/login.go b/cmd/notation/login.go index b8554d002..d7d4309e6 100644 --- a/cmd/notation/login.go +++ b/cmd/notation/login.go @@ -23,8 +23,8 @@ import ( "strings" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/internal/auth" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/internal/auth" "github.com/spf13/cobra" "golang.org/x/term" "oras.land/oras-go/v2/registry/remote/credentials" diff --git a/cmd/notation/login_test.go b/cmd/notation/login_test.go index f2496982b..f16497b40 100644 --- a/cmd/notation/login_test.go +++ b/cmd/notation/login_test.go @@ -17,7 +17,7 @@ import ( "os" "testing" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) func TestLoginCommand_PasswordFromArgs(t *testing.T) { diff --git a/cmd/notation/logout.go b/cmd/notation/logout.go index 4c17bc36a..ef89c2b31 100644 --- a/cmd/notation/logout.go +++ b/cmd/notation/logout.go @@ -18,8 +18,8 @@ import ( "errors" "fmt" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/internal/auth" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/internal/auth" "github.com/spf13/cobra" "oras.land/oras-go/v2/registry/remote/credentials" ) diff --git a/cmd/notation/main.go b/cmd/notation/main.go index be6d038c1..ccd085113 100644 --- a/cmd/notation/main.go +++ b/cmd/notation/main.go @@ -19,11 +19,11 @@ import ( "os/signal" "github.com/notaryproject/notation-go/dir" - "github.com/notaryproject/notation/cmd/notation/blob" - "github.com/notaryproject/notation/cmd/notation/cert" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/plugin" - "github.com/notaryproject/notation/cmd/notation/policy" + "github.com/notaryproject/notation/v2/cmd/notation/blob" + "github.com/notaryproject/notation/v2/cmd/notation/cert" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/plugin" + "github.com/notaryproject/notation/v2/cmd/notation/policy" "github.com/spf13/cobra" ) diff --git a/cmd/notation/manifest.go b/cmd/notation/manifest.go index da33b1f72..7e3da1c79 100644 --- a/cmd/notation/manifest.go +++ b/cmd/notation/manifest.go @@ -23,7 +23,7 @@ import ( "github.com/notaryproject/notation-go/log" notationregistry "github.com/notaryproject/notation-go/registry" - notationerrors "github.com/notaryproject/notation/cmd/notation/internal/errors" + notationerrors "github.com/notaryproject/notation/v2/cmd/notation/internal/errors" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "oras.land/oras-go/v2/registry" diff --git a/cmd/notation/plugin/install.go b/cmd/notation/plugin/install.go index 74848e203..a0849c42d 100644 --- a/cmd/notation/plugin/install.go +++ b/cmd/notation/plugin/install.go @@ -31,9 +31,9 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/log" "github.com/notaryproject/notation-go/plugin" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - notationplugin "github.com/notaryproject/notation/cmd/notation/internal/plugin" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + notationplugin "github.com/notaryproject/notation/v2/cmd/notation/internal/plugin" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" ) diff --git a/cmd/notation/plugin/install_test.go b/cmd/notation/plugin/install_test.go index 6f583d7ed..d739ef8d3 100644 --- a/cmd/notation/plugin/install_test.go +++ b/cmd/notation/plugin/install_test.go @@ -21,8 +21,8 @@ import ( "strings" "testing" - notationplugin "github.com/notaryproject/notation/cmd/notation/internal/plugin" - "github.com/notaryproject/notation/internal/osutil" + notationplugin "github.com/notaryproject/notation/v2/cmd/notation/internal/plugin" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" ) diff --git a/cmd/notation/plugin/uninstall.go b/cmd/notation/plugin/uninstall.go index c920760d1..93ddfcbbc 100644 --- a/cmd/notation/plugin/uninstall.go +++ b/cmd/notation/plugin/uninstall.go @@ -21,8 +21,8 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/plugin" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" "github.com/spf13/cobra" ) diff --git a/cmd/notation/policy/import.go b/cmd/notation/policy/import.go index 9982702bc..053fc85e1 100644 --- a/cmd/notation/policy/import.go +++ b/cmd/notation/policy/import.go @@ -21,8 +21,8 @@ import ( "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/verifier/trustpolicy" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/internal/osutil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/internal/osutil" "github.com/spf13/cobra" ) diff --git a/cmd/notation/registry.go b/cmd/notation/registry.go index 68d3ac6fc..1f9f964f7 100644 --- a/cmd/notation/registry.go +++ b/cmd/notation/registry.go @@ -21,10 +21,10 @@ import ( "github.com/notaryproject/notation-go/log" notationregistry "github.com/notaryproject/notation-go/registry" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - notationauth "github.com/notaryproject/notation/internal/auth" - nconfig "github.com/notaryproject/notation/internal/config" - "github.com/notaryproject/notation/internal/httputil" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + notationauth "github.com/notaryproject/notation/v2/internal/auth" + nconfig "github.com/notaryproject/notation/v2/internal/config" + "github.com/notaryproject/notation/v2/internal/httputil" "oras.land/oras-go/v2/registry" "oras.land/oras-go/v2/registry/remote" "oras.land/oras-go/v2/registry/remote/auth" diff --git a/cmd/notation/registry_test.go b/cmd/notation/registry_test.go index 7543ce156..b032a0c14 100644 --- a/cmd/notation/registry_test.go +++ b/cmd/notation/registry_test.go @@ -20,7 +20,7 @@ import ( "net/url" "testing" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) const ( diff --git a/cmd/notation/sign.go b/cmd/notation/sign.go index 3d1adb8e2..92ddd566b 100644 --- a/cmd/notation/sign.go +++ b/cmd/notation/sign.go @@ -25,13 +25,13 @@ import ( "github.com/notaryproject/notation-core-go/revocation/purpose" "github.com/notaryproject/notation-go" "github.com/notaryproject/notation-go/log" - "github.com/notaryproject/notation/cmd/notation/internal/experimental" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/sign" - "github.com/notaryproject/notation/internal/envelope" - "github.com/notaryproject/notation/internal/httputil" - clirev "github.com/notaryproject/notation/internal/revocation" - nx509 "github.com/notaryproject/notation/internal/x509" + "github.com/notaryproject/notation/v2/cmd/notation/internal/experimental" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/sign" + "github.com/notaryproject/notation/v2/internal/envelope" + "github.com/notaryproject/notation/v2/internal/httputil" + clirev "github.com/notaryproject/notation/v2/internal/revocation" + nx509 "github.com/notaryproject/notation/v2/internal/x509" "github.com/notaryproject/tspclient-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/spf13/cobra" diff --git a/cmd/notation/sign_test.go b/cmd/notation/sign_test.go index 2a2559875..47136b139 100644 --- a/cmd/notation/sign_test.go +++ b/cmd/notation/sign_test.go @@ -19,8 +19,8 @@ import ( "testing" "time" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/internal/envelope" ) func TestSignCommand_BasicArgs(t *testing.T) { diff --git a/cmd/notation/verify.go b/cmd/notation/verify.go index d63d7ea25..a131754a0 100644 --- a/cmd/notation/verify.go +++ b/cmd/notation/verify.go @@ -18,11 +18,11 @@ import ( "fmt" "github.com/notaryproject/notation-go" - "github.com/notaryproject/notation/cmd/notation/internal/display" - "github.com/notaryproject/notation/cmd/notation/internal/display/output" - "github.com/notaryproject/notation/cmd/notation/internal/experimental" - "github.com/notaryproject/notation/cmd/notation/internal/flag" - "github.com/notaryproject/notation/cmd/notation/internal/verify" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display" + "github.com/notaryproject/notation/v2/cmd/notation/internal/display/output" + "github.com/notaryproject/notation/v2/cmd/notation/internal/experimental" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/verify" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/spf13/cobra" ) diff --git a/cmd/notation/verify_test.go b/cmd/notation/verify_test.go index 7faee20f5..6744f03e1 100644 --- a/cmd/notation/verify_test.go +++ b/cmd/notation/verify_test.go @@ -17,7 +17,7 @@ import ( "reflect" "testing" - "github.com/notaryproject/notation/cmd/notation/internal/flag" + "github.com/notaryproject/notation/v2/cmd/notation/internal/flag" ) func TestVerifyCommand_BasicArgs(t *testing.T) { diff --git a/cmd/notation/version.go b/cmd/notation/version.go index 4f0c97170..96cc91f6c 100644 --- a/cmd/notation/version.go +++ b/cmd/notation/version.go @@ -17,7 +17,7 @@ import ( "fmt" "runtime" - "github.com/notaryproject/notation/internal/version" + "github.com/notaryproject/notation/v2/internal/version" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index ce95ab06d..0c768b075 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/notaryproject/notation +module github.com/notaryproject/notation/v2 go 1.24.0 diff --git a/internal/config/config.go b/internal/config/config.go index cda9937e3..7d18c2c6a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -20,7 +20,7 @@ import ( "sync" "github.com/notaryproject/notation-go/config" - "github.com/notaryproject/notation/internal/envelope" + "github.com/notaryproject/notation/v2/internal/envelope" ) // loadConfigOnce is a function that invokes loadConfig only once. diff --git a/internal/httputil/client.go b/internal/httputil/client.go index c9c39f676..4ac5e39ea 100644 --- a/internal/httputil/client.go +++ b/internal/httputil/client.go @@ -17,8 +17,8 @@ import ( "context" "net/http" - "github.com/notaryproject/notation/internal/trace" - "github.com/notaryproject/notation/internal/version" + "github.com/notaryproject/notation/v2/internal/trace" + "github.com/notaryproject/notation/v2/internal/version" "oras.land/oras-go/v2/registry/remote/auth" ) diff --git a/internal/revocation/revocation.go b/internal/revocation/revocation.go index 412d6f0e5..32a8c4b55 100644 --- a/internal/revocation/revocation.go +++ b/internal/revocation/revocation.go @@ -25,8 +25,8 @@ import ( "github.com/notaryproject/notation-core-go/revocation/purpose" "github.com/notaryproject/notation-go/dir" "github.com/notaryproject/notation-go/verifier/crl" - "github.com/notaryproject/notation/internal/httputil" - clicrl "github.com/notaryproject/notation/internal/revocation/crl" + "github.com/notaryproject/notation/v2/internal/httputil" + clicrl "github.com/notaryproject/notation/v2/internal/revocation/crl" ) // NewRevocationValidator returns a revocation.Validator given the certificate diff --git a/internal/revocation/revocation_test.go b/internal/revocation/revocation_test.go index eeb7ff54b..a1454f3ff 100644 --- a/internal/revocation/revocation_test.go +++ b/internal/revocation/revocation_test.go @@ -24,7 +24,7 @@ import ( corecrl "github.com/notaryproject/notation-core-go/revocation/crl" "github.com/notaryproject/notation-core-go/revocation/purpose" "github.com/notaryproject/notation-go/dir" - "github.com/notaryproject/notation/internal/httputil" + "github.com/notaryproject/notation/v2/internal/httputil" ) func TestNewRevocationValidator(t *testing.T) {