mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
76b7f1270a
commit
436c90c51a
1 changed files with 10 additions and 14 deletions
|
@ -3,31 +3,27 @@ distributable:
|
||||||
strip-components: 1
|
strip-components: 1
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
github: hashicorp/packer/tags
|
github: hashicorp/packer/tags
|
||||||
strip: /^v/
|
strip: /^v/
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
- bin/packer
|
- bin/packer
|
||||||
|
|
||||||
build:
|
build:
|
||||||
script: |
|
script:
|
||||||
go mod download
|
- go mod download
|
||||||
go build -v -ldflags="$LDFLAGS" -o my_packer
|
- go build -v -ldflags="$GO_LDFLAGS" -o "{{ prefix }}"/bin/packer
|
||||||
mkdir -p "{{ prefix }}"/bin
|
|
||||||
# move and rename back to packer
|
|
||||||
mv my_packer "{{ prefix }}"/bin/packer
|
|
||||||
dependencies:
|
dependencies:
|
||||||
go.dev: ^1.18
|
go.dev: ^1.18
|
||||||
env:
|
env:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
LDFLAGS:
|
GO_LDFLAGS: [-s, -w, '-X=main.Version={{version}}']
|
||||||
[-s, -w, "-X=main.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:
|
GO_LDFLAGS:
|
||||||
- -buildmode=pie
|
- -buildmode=pie
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script: |
|
- packer --version
|
||||||
test "$(packer --version)" = {{version}}
|
- packer --version | grep {{version}}
|
||||||
|
|
Loading…
Reference in a new issue