mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
parent
76b7f1270a
commit
436c90c51a
|
@ -10,24 +10,20 @@ 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