mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+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>
This commit is contained in:
parent
005c13f2e8
commit
cd963ef66a
1 changed files with 31 additions and 0 deletions
31
projects/cnquery.io/package.yml
Normal file
31
projects/cnquery.io/package.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
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)'
|
Loading…
Reference in a new issue