2023-03-13 22:14:00 +03:00
|
|
|
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: '*'
|
2023-03-23 22:02:25 +03:00
|
|
|
crates.io/semverator: ^0
|
2023-06-15 16:28:12 +03:00
|
|
|
script:
|
|
|
|
# Add go.mod on older versions
|
|
|
|
- run: patch -p1 <props/patch-go-modules.diff
|
|
|
|
if: <3.25
|
|
|
|
|
|
|
|
- mkdir -p {{prefix}}/bin
|
2023-03-23 22:02:25 +03:00
|
|
|
|
2023-06-15 16:28:12 +03:00
|
|
|
- go build
|
|
|
|
-v
|
|
|
|
-ldflags="$LDFLAGS"
|
|
|
|
-o {{prefix}}/bin/go-bindata
|
|
|
|
./go-bindata
|
2023-03-13 22:14:00 +03:00
|
|
|
|
|
|
|
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
|