mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
+go-bindata
go-bindata is a small utility which generates Go code from any file.
This commit is contained in:
parent
d9732f2552
commit
04e804f4e2
2 changed files with 49 additions and 0 deletions
39
projects/github.com/kevinburke/go-bindata/package.yml
Normal file
39
projects/github.com/kevinburke/go-bindata/package.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
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
|
|
@ -0,0 +1,10 @@
|
|||
diff --git a/go.mod b/go.mod
|
||||
new file mode 100644
|
||||
index 0000000..ce4eba8
|
||||
--- /dev/null
|
||||
+++ b/go.mod
|
||||
@@ -0,0 +1,3 @@
|
||||
+module github.com/kevinburke/go-bindata
|
||||
+
|
||||
+go 1.19
|
||||
|
Loading…
Reference in a new issue