From 275010fe4da972718e31bad589aa63feafb5e0c1 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 15 Mar 2024 12:07:47 -0400 Subject: [PATCH] +shovel --- projects/indexsupply.com/shovel/package.yml | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 projects/indexsupply.com/shovel/package.yml diff --git a/projects/indexsupply.com/shovel/package.yml b/projects/indexsupply.com/shovel/package.yml new file mode 100644 index 00000000..84e7a0a3 --- /dev/null +++ b/projects/indexsupply.com/shovel/package.yml @@ -0,0 +1,37 @@ +distributable: + url: https://github.com/indexsupply/code/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: indexsupply/code/tags + strip: [/beta/] # FIXME: remove after 1.0 + +provides: + - bin/shovel + +companions: + postgresql.org: '*' + +build: + dependencies: + go.dev: ^1.21 + working-directory: cmd/shovel + script: + - go mod download + - go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC ./ + env: + BUILDLOC: '{{prefix}}/bin/shovel' + LDFLAGS: + - -s + - -w + - -X main.Version={{version}} + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + +test: + script: + - shovel --help + - shovel -version | grep '^v{{version}}'