pantry/projects/taskfile.dev/package.yml

36 lines
862 B
YAML
Raw Normal View History

2024-06-30 21:24:05 +03:00
distributable:
url: https://github.com/go-task/task/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
displayname: Task
versions:
github: go-task/task/releases/tags
provides:
- bin/task
build:
dependencies:
go.dev: ^1.19
2024-06-30 21:24:05 +03:00
script:
- run: sed -i 's/info.Main.Version/"{{version}}"/g' version.go
working-directory: internal/version
- go build -o {{prefix}}/bin/task -ldflags="$LDFLAGS" ./cmd/task
env:
GOBIN: ${{prefix}}/bin
LDFLAGS:
- -s
- -w
- -X github.com/go-task/task/v3/internal/version.version={{version}}
linux:
# or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
LDFLAGS:
- -buildmode=pie
test:
2024-06-30 21:24:05 +03:00
- task --init
- test -f Taskfile.yml
- "task --version | grep 'Task version: {{version}}'"