From a1ec01ff7683a60d9bede131855c762d00983c9d Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Wed, 31 Jan 2024 10:53:53 +0800 Subject: [PATCH] chore: fix docs and e2e (#17) - Add entry points for examples in `README.md` - Fix E2E test arguments - Add `.gitignore` - Replace `go.work` with `go.mod` --------- Signed-off-by: Shiwei Zhang --- .gitignore | 20 ++++++++++++++++++++ Makefile | 1 - README.md | 6 ++++++ example/envelopegenerator/go.work | 16 ---------------- example/go.mod | 7 +++++++ example/signaturegenerator/go.work | 16 ---------------- test/e2e/run.sh | 2 +- 7 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .gitignore delete mode 100644 example/envelopegenerator/go.work create mode 100644 example/go.mod delete mode 100644 example/signaturegenerator/go.work diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..135f692 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Copyright The Notary Project Authors. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# VS Code +.vscode + +# Custom +bin/ +vendor/ +test/e2e/bin/ diff --git a/Makefile b/Makefile index 1c78062..3d94e22 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,6 @@ clean: .PHONY: check-line-endings check-line-endings: ## check line endings ! find . -name "*.go" -type f -exec file "{}" ";" | grep CRLF - ! find scripts -name "*.sh" -type f -exec file "{}" ";" | grep CRLF .PHONY: fix-line-endings fix-line-endings: ## fix line endings diff --git a/README.md b/README.md index e02d0b3..b32867d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Please visit [README](https://github.com/notaryproject/.github/blob/main/README. ## Table of Contents - [Documentation](#documentation) +- [Example Plugins](#example-plugins) - [Code of Conduct](#code-of-conduct) - [License](#license) @@ -21,6 +22,11 @@ Please visit [README](https://github.com/notaryproject/.github/blob/main/README. Library documentation is available at [Go Reference](https://pkg.go.dev/github.com/notaryproject/notation-plugin-framework-go). +## Example Plugins + +- [Signature generator](example/signaturegenerator/) +- [Envelope generator](example/envelopegenerator/) + ## Code of Conduct This project has adopted the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for further details. diff --git a/example/envelopegenerator/go.work b/example/envelopegenerator/go.work deleted file mode 100644 index 4e9c99d..0000000 --- a/example/envelopegenerator/go.work +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright The Notary Project Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -go 1.20 - -use ./../.. \ No newline at end of file diff --git a/example/go.mod b/example/go.mod new file mode 100644 index 0000000..ce9c62b --- /dev/null +++ b/example/go.mod @@ -0,0 +1,7 @@ +module github.com/notaryproject/notation-plugin-framework-go/example + +go 1.20 + +require github.com/notaryproject/notation-plugin-framework-go v0.0.0-00010101000000-000000000000 + +replace github.com/notaryproject/notation-plugin-framework-go => ../ diff --git a/example/signaturegenerator/go.work b/example/signaturegenerator/go.work deleted file mode 100644 index 4e9c99d..0000000 --- a/example/signaturegenerator/go.work +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright The Notary Project Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -go 1.20 - -use ./../.. \ No newline at end of file diff --git a/test/e2e/run.sh b/test/e2e/run.sh index b380f0c..71348c3 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -27,4 +27,4 @@ done # run e2e tests echo "running e2e tests..." echo "==============================" -go test -race -v ./... -args -env_gen_plugin="./bin/${plugin_directories[0]}/$PLUGIN_NAME" - sig_gen_plugin="./bin/${plugin_directories[1]}/$PLUGIN_NAME" +go test -race -v ./... -args -env_gen_plugin="./bin/${plugin_directories[0]}/$PLUGIN_NAME" -sig_gen_plugin="./bin/${plugin_directories[1]}/$PLUGIN_NAME"