mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
Create gomplate > first (dirty) attempt (#834)
* Create gomplate > first (dirty) attempt cf #817 * Rename gomplate to package.yml * wip * complex version setting procedure --------- Co-authored-by: Max Howell <mxcl@me.com> Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
235fa66483
commit
5ccc969cde
42
projects/gomplate.ca/package.yml
Normal file
42
projects/gomplate.ca/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
distributable:
|
||||
url: https://github.com/hairyhenderson/gomplate/archive/refs/tags/v{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: hairyhenderson/gomplate
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
# panic: Something in this program imports
|
||||
# go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving
|
||||
# garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc
|
||||
# hasn't been updated to assert that it's safe against the go1.20 runtime.
|
||||
# If you want to risk it, run with environment variable
|
||||
# ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20 set. Notably, if go1.20
|
||||
# adds a moving garbage collector, this program is unsafe to use.
|
||||
go.dev: ~1.19
|
||||
script: |
|
||||
go mod download
|
||||
go build -v -ldflags="$LDFLAGS" ./cmd/gomplate
|
||||
mkdir -p "{{prefix}}"/bin
|
||||
mv gomplate "{{prefix}}"/bin
|
||||
env:
|
||||
LDFLAGS:
|
||||
- -s
|
||||
- -w
|
||||
- -X $(go list ./version).Version={{version}}
|
||||
linux:
|
||||
# or segmentation fault
|
||||
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||
LDFLAGS:
|
||||
- -buildmode=pie
|
||||
|
||||
provides:
|
||||
- bin/gomplate
|
||||
|
||||
test:
|
||||
fixture: |
|
||||
Hello, {{ .Env.USER }}
|
||||
script: |
|
||||
test "$(gomplate < $FIXTURE)" = "Hello, $USER"
|
||||
test "$(gomplate --version)" = "gomplate version {{version}}"
|
Loading…
Reference in a new issue