From c9f6adaff73300fd9f221990565da7b0a14b2296 Mon Sep 17 00:00:00 2001 From: Sanchit Ram Arvind Date: Sat, 22 Jun 2024 11:37:49 -0600 Subject: [PATCH] +ctop (#6484) * +ctop * better test, copied make file steps * GO_LDFLAGS * review feedback * review comments * move to ctop.sh * rename * small style fixes --------- Co-authored-by: Jacob Heider --- projects/ctop.sh/package.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/ctop.sh/package.yml diff --git a/projects/ctop.sh/package.yml b/projects/ctop.sh/package.yml new file mode 100644 index 00000000..619fc7d3 --- /dev/null +++ b/projects/ctop.sh/package.yml @@ -0,0 +1,31 @@ +distributable: + url: https://github.com/bcicen/ctop/archive/refs/tags/{{ version.tag }}.tar.gz + strip-components: 1 + +display-name: ctop + +versions: + github: bcicen/ctop + +build: + dependencies: + go.dev: ~1.18 + + script: + - go mod download + - go build -tags release -ldflags="$GO_LDFLAGS" -o "{{prefix}}/bin/ctop" + env: + GO_LDFLAGS: + - -s + - -w + - -X main.version={{version}} + - -X main.build=pkgx + linux: + GO_LDFLAGS: + - -buildmode=pie + +provides: + - bin/ctop + +# comma is intentional (part of the awk slice) +test: test "$(ctop -v | awk '{print $3}')" = "{{version}},"