From c5ed1b6f9256ce1c0cc96a53dce05281c3ffb098 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 31 May 2026 20:42:56 +0200 Subject: [PATCH] new(dapr.io): Distributed Application Runtime CLI (CNCF graduated) Source build of the dapr CLI from dapr/cli. The daprd runtime (K8s sidecar / multi-binary) is out of scope here and can ship as a follow-up recipe. --- projects/dapr.io/package.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 projects/dapr.io/package.yml diff --git a/projects/dapr.io/package.yml b/projects/dapr.io/package.yml new file mode 100644 index 0000000000..e2ec888c52 --- /dev/null +++ b/projects/dapr.io/package.yml @@ -0,0 +1,34 @@ +distributable: + url: https://github.com/dapr/cli/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: dapr/cli + +provides: + - bin/dapr + +build: + dependencies: + go.dev: '*' + script: + - go mod download + - go build -v -trimpath -ldflags="$GO_LDFLAGS" -o {{prefix}}/bin/dapr . + env: + CGO_ENABLED: 0 + GO_LDFLAGS: + - -s + - -w + - -X main.version={{version}} + - -X main.apiVersion=1.0 + - -X github.com/dapr/cli/pkg/standalone.gitcommit=pkgx + - -X github.com/dapr/cli/pkg/standalone.gitversion=v{{version}} + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + GO_LDFLAGS: + - -buildmode=pie + +test: + - dapr help + - 'test "$(dapr version | head -n1)" = "CLI version: {{version}} "'