mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 10:35:17 +03:00
cdf58073d8
* Add hcloud * Fix versioning and test against version
33 lines
783 B
YAML
33 lines
783 B
YAML
distributable:
|
|
url: https://github.com/hetznercloud/cli/archive/refs/tags/v{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
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
|
|
dependencies:
|
|
go.dev: ^1.18
|
|
env:
|
|
GO111MODULE: on
|
|
CGO_ENABLED: 0
|
|
LDFLAGS:
|
|
[-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
|
|
|
|
test:
|
|
script: |
|
|
test "$(hcloud version)" = "hcloud {{version}}"
|