pantry/projects/hetzner.com/hcloud/package.yml

32 lines
744 B
YAML
Raw Normal View History

distributable:
url: https://github.com/hetznercloud/cli/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
2024-02-01 20:13:45 +03:00
github: hetznercloud/cli/tags
strip: /^v/
2024-02-01 20:13:45 +03:00
provides:
- bin/hcloud
build:
2024-02-01 20:13:45 +03:00
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:
2024-02-01 20:13:45 +03:00
- -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:
2024-02-01 20:13:45 +03:00
- -buildmode=pie
test:
2024-02-01 20:13:45 +03:00
- hcloud version
- hcloud version | grep "hcloud {{version}}"