taskfile.dev (#2323)

* taskfile.dev

* simplifications

---------

Co-authored-by: Jacob Heider <jhheider@gmail.com>
This commit is contained in:
Max Winterstein 2023-06-30 05:13:25 +02:00 committed by GitHub
parent ebceb3eb87
commit 5a1e537ba1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,33 @@
#FIXME: we should use source if possible
distributable: ~
displayname: Task
versions:
github: go-task/task/releases/tags
provides:
- bin/task
build:
dependencies:
go.dev: ^1.19
working-directory: ${{prefix}}/bin
script: go install -ldflags="$LDFLAGS" github.com/go-task/task/v3/cmd/task@v{{version}}
env:
GOBIN: ${{prefix}}/bin
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: |
task --init
test -f Taskfile.yml
task --version | grep 'Task version: v{{version}}'