From e9aaaa3af44efba37b75190e4ea7d22709c25bf8 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 1 Feb 2024 12:13:45 -0500 Subject: [PATCH] fix(hcloud) closes #5083 --- projects/hetzner.com/hcloud/package.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/projects/hetzner.com/hcloud/package.yml b/projects/hetzner.com/hcloud/package.yml index 610c8b51..f48da747 100644 --- a/projects/hetzner.com/hcloud/package.yml +++ b/projects/hetzner.com/hcloud/package.yml @@ -3,30 +3,29 @@ distributable: strip-components: 1 versions: - github: hetznercloud/cli/tags + github: hetznercloud/cli/tags strip: /^v/ - + provides: - bin/hcloud build: - script: | - go build -o hcloud -v -ldflags="$LDFLAGS" cmd/hcloud/main.go - mkdir -p "{{ prefix }}"/bin - mv hcloud "{{ prefix }}"/bin + script: go build -o "{{ prefix }}"/bin/hcloud -v -ldflags="$LDFLAGS" cmd/hcloud/main.go dependencies: go.dev: ^1.18 env: GO111MODULE: on CGO_ENABLED: 0 LDFLAGS: - [-s, -w, "-X=github.com/hetznercloud/cli/internal/version.Version={{version}}"] + - -s + - -w + - '-X=github.com/hetznercloud/cli/internal/version.Version={{version}}' linux: # or segmentation fault # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 LDFLAGS: - - -buildmode=pie + - -buildmode=pie test: - script: | - test "$(hcloud version)" = "hcloud {{version}}" + - hcloud version + - hcloud version | grep "hcloud {{version}}"