pantry/projects/cnquery.io/package.yml
Andrew cd963ef66a
+cnquery.io (#4767)
* new file:   projects/cnquery.io/package.yml

* fix it

* use go version from go.mod

---------

Co-authored-by: Michael Essiet <emsaa2002@gmail.com>
Co-authored-by: Jacob Heider <jacob@pkgx.dev>
2024-01-08 13:18:13 -05:00

32 lines
882 B
YAML

distributable:
url: https://github.com/mondoohq/cnquery/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: mondoohq/cnquery
build:
dependencies:
go.dev: ~1.21
script:
- go build $ARGS -ldflags="$LD_FLAGS" ./apps/cnquery/cnquery.go
env:
LD_FLAGS:
- -s
- -w
linux:
LD_FLAGS:
- -buildmode=pie
ARGS:
- -v
- -trimpath
- -o={{prefix}}/bin/cnquery
provides:
- bin/cnquery
test:
dependencies:
curl.se: '*'
script:
- cnquery run -c "ports.listening { port process }"
- curl -L "https://raw.githubusercontent.com/mondoohq/cnquery/main/examples/complex.mql.yaml" -o complex.mql.yaml
- curl -L "https://raw.githubusercontent.com/mondoohq/cnquery/main/examples/example-os.mql.yaml" -o example-os.mql.yaml
- cnquery scan -f complex.mql.yaml | grep 'Summary (1 assets)'