mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 04:25:08 +03:00
parent
0bfec00a12
commit
e9aaaa3af4
1 changed files with 9 additions and 10 deletions
|
@ -10,23 +10,22 @@ provides:
|
||||||
- bin/hcloud
|
- bin/hcloud
|
||||||
|
|
||||||
build:
|
build:
|
||||||
script: |
|
script: go build -o "{{ prefix }}"/bin/hcloud -v -ldflags="$LDFLAGS" cmd/hcloud/main.go
|
||||||
go build -o hcloud -v -ldflags="$LDFLAGS" cmd/hcloud/main.go
|
|
||||||
mkdir -p "{{ prefix }}"/bin
|
|
||||||
mv hcloud "{{ prefix }}"/bin
|
|
||||||
dependencies:
|
dependencies:
|
||||||
go.dev: ^1.18
|
go.dev: ^1.18
|
||||||
env:
|
env:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
LDFLAGS:
|
LDFLAGS:
|
||||||
[-s, -w, "-X=github.com/hetznercloud/cli/internal/version.Version={{version}}"]
|
- -s
|
||||||
|
- -w
|
||||||
|
- '-X=github.com/hetznercloud/cli/internal/version.Version={{version}}'
|
||||||
linux:
|
linux:
|
||||||
# or segmentation fault
|
# or segmentation fault
|
||||||
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||||
LDFLAGS:
|
LDFLAGS:
|
||||||
- -buildmode=pie
|
- -buildmode=pie
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script: |
|
- hcloud version
|
||||||
test "$(hcloud version)" = "hcloud {{version}}"
|
- hcloud version | grep "hcloud {{version}}"
|
||||||
|
|
Loading…
Reference in a new issue