From c5b6625b819dde4e450e3e238c89fe7b159e6a53 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 13 Jun 2024 12:13:21 -0400 Subject: [PATCH] +kube-capacity closes #6412 --- .../robscott/kube-capacity/package.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 projects/github.com/robscott/kube-capacity/package.yml diff --git a/projects/github.com/robscott/kube-capacity/package.yml b/projects/github.com/robscott/kube-capacity/package.yml new file mode 100644 index 00000000..26d50c7e --- /dev/null +++ b/projects/github.com/robscott/kube-capacity/package.yml @@ -0,0 +1,29 @@ +distributable: + url: https://github.com/robscott/kube-capacity/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: robscott/kube-capacity + +build: + dependencies: + go.dev: ~1.21 + env: + GO_LDFLAGS: + - -s + - -w + linux: + GO_LDFLAGS: + - -buildmode=pie + script: + - run: sed -i 's/"kube-capacity version v.*"/"kube-capacity version v{{version}}"/' version.go + working-directory: pkg/cmd + - go build -v -ldflags="${GO_LDFLAGS}" -o "{{ prefix }}"/bin/kube-capacity . + +provides: + - bin/kube-capacity + +test: + - test "$(kube-capacity version)" = "kube-capacity version v{{version}}" + - kube-capacity help + - kube-capacity completion bash