From d62bba1b4e5b846ea0af7c81a6917f90dda0b070 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 Mar 2024 15:39:39 +0100 Subject: [PATCH] +github.com/loq9/go-sponge --- .../github.com/loq9/go-sponge/package.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 projects/github.com/loq9/go-sponge/package.yml diff --git a/projects/github.com/loq9/go-sponge/package.yml b/projects/github.com/loq9/go-sponge/package.yml new file mode 100644 index 00000000..13f5eee4 --- /dev/null +++ b/projects/github.com/loq9/go-sponge/package.yml @@ -0,0 +1,37 @@ +distributable: + url: https://github.com/LOQ9/go-sponge/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +display-name: go-sponge + +versions: + github: LOQ9/go-sponge + strip: + - /^v/ + +build: + dependencies: + go.dev: ^1.20 + env: + CGO_ENABLED: 0 + LDFLAGS: + - -s + - -w + linux: + LDFLAGS: + - -buildmode=pie + script: go build -v -ldflags="${LDFLAGS}" -o "{{ prefix }}"/bin/go-sponge + +provides: +- bin/go-sponge + +test: + dependencies: + gnu.org/coreutils: '*' + stedolan.github.io/jq: ^1.6 + + script: | + jq --null-input \ + 'type|if "null" then {A:3} else .+={A:3} end' db.json \ + | go-sponge db.json + cat db.json