mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
+cuelang (#101)
* +cuelang Add `cue` from cuelang.org * split ldflags * add a better test
This commit is contained in:
parent
e64d38afbe
commit
d26f5a7d96
2 changed files with 34 additions and 0 deletions
3
projects/cuelang.org/data.cue
Normal file
3
projects/cuelang.org/data.cue
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
package tea
|
||||||
|
|
||||||
|
project: "cuelang.org"
|
31
projects/cuelang.org/package.yml
Normal file
31
projects/cuelang.org/package.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/cue-lang/cue/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: cue-lang/cue/tags
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/cue
|
||||||
|
|
||||||
|
build:
|
||||||
|
script: |
|
||||||
|
go mod download
|
||||||
|
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/cue ./cmd/cue
|
||||||
|
dependencies:
|
||||||
|
go.dev: ^1.18
|
||||||
|
env:
|
||||||
|
LDFLAGS:
|
||||||
|
- -s
|
||||||
|
- -w
|
||||||
|
- -X cuelang.org/go/cmd/cue/cmd.version=v{{ version }}
|
||||||
|
linux:
|
||||||
|
# or segmentation fault
|
||||||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||||
|
LDFLAGS:
|
||||||
|
- -buildmode=pie
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
out=$(cue export data.cue --out yaml)
|
||||||
|
test "$out" = "project: cuelang.org"
|
Loading…
Reference in a new issue