From 4f695cf49987c594ddfae29cc21d84f0d441d7c2 Mon Sep 17 00:00:00 2001 From: John Allen Date: Tue, 17 Jan 2023 20:36:51 -0500 Subject: [PATCH] +k6 --- projects/k6.io/package.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 projects/k6.io/package.yml diff --git a/projects/k6.io/package.yml b/projects/k6.io/package.yml new file mode 100644 index 00000000..80b1f10b --- /dev/null +++ b/projects/k6.io/package.yml @@ -0,0 +1,32 @@ +distributable: + url: https://github.com/grafana/k6/archive/refs/tags/v{{ version }}.tar.gz + strip-components: 1 + +versions: + github: grafana/k6/tags + +provides: + - bin/k6 + +build: + script: | + go build -v -ldflags="$LDFLAGS" + mkdir -p "{{ prefix }}"/bin + mv k6 "{{ prefix }}"/bin + dependencies: + go.dev: ^1.18 + env: + LDFLAGS: + - -s + - -w + - -X main.version={{ version }} + - -X main.revision=tea + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + +test: + script: | + k6 version