From 4d0999fe0778041644854c4c1d72410960db97b6 Mon Sep 17 00:00:00 2001 From: Vaibhav Kumbhar Date: Sat, 21 Oct 2023 10:01:26 +0530 Subject: [PATCH] feat(kpt.dev): add kpt package to pantry (#3667) * feat(kpt.dev): add kpt package to pantry * build from source --------- Co-authored-by: Jacob Heider --- projects/kpt.dev/package.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/kpt.dev/package.yml diff --git a/projects/kpt.dev/package.yml b/projects/kpt.dev/package.yml new file mode 100644 index 00000000..fcfc4aa8 --- /dev/null +++ b/projects/kpt.dev/package.yml @@ -0,0 +1,31 @@ +# https://kpt.dev/ + +distributable: + url: https://github.com/kptdev/kpt/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: kptdev/kpt/tags + +dependencies: + git-scm.org: '*' + +build: + dependencies: + go.dev: ^1.14 + script: go build -v -trimpath -ldflags="$LDFLAGS" -o "{{prefix}}/bin/kpt" . + env: + LDFLAGS: + - -s + - -w + - -X github.com/GoogleContainerTools/kpt/run.version={{version}} + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + +provides: + - bin/kpt + +test: test "$(kpt version)" = {{version}}