mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 12:15:06 +03:00
40 lines
872 B
YAML
40 lines
872 B
YAML
|
distributable:
|
||
|
url: https://github.com/kevinburke/go-bindata/archive/refs/tags/v{{version}}.tar.gz
|
||
|
strip-components: 1
|
||
|
|
||
|
versions:
|
||
|
github: kevinburke/go-bindata
|
||
|
|
||
|
provides:
|
||
|
- bin/go-bindata
|
||
|
|
||
|
build:
|
||
|
dependencies:
|
||
|
go.dev: ^1.18
|
||
|
gnu.org/patch: '*'
|
||
|
script: |
|
||
|
patch -p1 <props/patch-go-modules.diff
|
||
|
mkdir -p "{{ prefix }}"/bin
|
||
|
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/go-bindata ./go-bindata
|
||
|
|
||
|
env:
|
||
|
LDFLAGS:
|
||
|
[-s, -w, "-X=main.Version={{version}}"]
|
||
|
linux:
|
||
|
# or segmentation fault
|
||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||
|
LDFLAGS:
|
||
|
- -buildmode=pie
|
||
|
|
||
|
test:
|
||
|
script: |
|
||
|
output=$(go-bindata -version)
|
||
|
case $output in
|
||
|
*{{ version }}*)
|
||
|
echo "Version match"
|
||
|
;;
|
||
|
*)
|
||
|
echo "Version mismatch"
|
||
|
;;
|
||
|
esac
|