diff --git a/projects/github.com/TomWright/dasel/fixture.json b/projects/github.com/TomWright/dasel/fixture.json new file mode 100644 index 00000000..7adf3b85 --- /dev/null +++ b/projects/github.com/TomWright/dasel/fixture.json @@ -0,0 +1,5 @@ +{ + "hello": { + "world": "Hello, World!" + } +} \ No newline at end of file diff --git a/projects/github.com/TomWright/dasel/package.yml b/projects/github.com/TomWright/dasel/package.yml new file mode 100644 index 00000000..bc94edf0 --- /dev/null +++ b/projects/github.com/TomWright/dasel/package.yml @@ -0,0 +1,27 @@ +distributable: + url: https://github.com/TomWright/dasel/archive/refs/tags/v{{version.raw}}.tar.gz + strip-components: 1 + +versions: + github: TomWright/dasel/tags + strip: /v/ + +build: + dependencies: + go.dev: ^1 + env: + GOBIN: "{{prefix}}/bin" + LDFLAGS: + - -X 'github.com/tomwright/dasel/v2/internal.Version={{version}}' + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + working-directory: cmd/dasel + script: go install -ldflags="$LDFLAGS" + +provides: + - bin/dasel + +test: test "$(cat fixture.json | dasel -r json 'hello.world')" = '"Hello, World!"'