From 1e26e26368f6ffe2dd4bff9c9fc57dd7a6afdd3d Mon Sep 17 00:00:00 2001 From: Sertac Ozercan Date: Tue, 17 Oct 2023 17:17:50 +0000 Subject: [PATCH] update repo with prereqs Signed-off-by: Sertac Ozercan --- README.md | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ea66c3f..82dcf10 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a template repo for creating a scanner plugin for [Copacetic](https://github.com/project-copacetic/copacetic). -Learn more about Copacetic's scanner plugins [here](https://project-copacetic.github.io/copacetic/). +Learn more about Copacetic's scanner plugins [here](https://project-copacetic.github.io/copacetic/scanner-plugins). ## Development @@ -15,14 +15,33 @@ These instructions are for developing a new scanner plugin for [Copacetic](https 5. Update `CLI_BINARY` in the [`Makefile`](Makefile) to match your scanner's CLI binary name (resulting binary must be prefixed with `copa-`) 5. Update this [`README.md`](README.md) to match your plugin's usage -## Example Usage +## Development Pre-requisites + +> [!NOTE] +> You may have different pre-requisites for your scanner plugin, you are not required to use these tools. + +The following tools are required to build and run this template: + +- `git`: for cloning this repo +- `Go`: for building the plugin +- `make`: for the Makefile + +## Example Development Workflow + +This is an example development workflow for this template. ```shell -# assuming $GOPATH/bin or $GOBIN is in $PATH -go install github.com/project-copacetic/scanner-plugin-template@latest +# clone this repo +git clone https://github.com/project-copacetic/scanner-plugin-template.git + +# change directory to the repo +cd scanner-plugin-template + +# build the copa-fake binary +make -# rename binary to copa- (e.g. copa-fake) -mv $GOPATH/bin/scanner-plugin-template $GOPATH/bin/copa-fake +# add copa-fake binary to PATH +export PATH=$PATH:dist/linux_amd64/release/ # test plugin with example config copa-fake testdata/fake_report.json