swinton / sclix-list-projects

Snyk CLI extension for example List Projects command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snyk CLI list-projects extension

An example Snyk CLI Extension introducing a new list-projects command.

Building an extension

An extension must produce an appropriately named, os/architecture specific binary in an output folder name _bin when running make build. You can achieve this by running:

make build install prefix=./bin/

You can execute the extension locally with Snyk CLI:

snyk list-projects --additional-extension-path=/path/to/this/extension/folder/sclix-list-projects

The format of the output files should be <extension-name>_<OS>_<ARCH>, where <extension-name> is the name in the extension.json.

Specifically, the following files should be generated in the appropriate situation:

OS Arch Executable Binary Output file Notes
macOS amd64 _darwin_amd64
macOS arm64 _darwin_amd64 Note that this output file is amd_64 and not arm_64
linux amd64 _linux_amd64
linux arm64 _linux_arm64
windows amd64 _windows_arm64

The makefile must also have make test target which runs any tests and exists with a zero exit code on success.

About

Snyk CLI extension for example List Projects command

License:Other


Languages

Language:Go 57.7%Language:Makefile 36.4%Language:Shell 5.9%