fix(taskfile.dev) Build from local sources

This commit is contained in:
Max Winterstein 2023-07-02 13:14:43 +02:00 committed by Max Howell
parent b38b0d5d2e
commit f0e5f5b286

View file

@ -1,5 +1,6 @@
#FIXME: we should use source if possible
distributable: ~
distributable:
url: https://github.com/go-task/task/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
displayname: Task
@ -12,14 +13,13 @@ provides:
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}}
script: go build -o {{prefix}}/bin/task -ldflags="$LDFLAGS" ./cmd/task
env:
GOBIN: ${{prefix}}/bin
LDFLAGS:
- -s
- -w
- -X main.Version={{version}}
- -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
@ -30,4 +30,4 @@ test:
script: |
task --init
test -f Taskfile.yml
task --version | grep 'Task version: v{{version}}'
task --version | grep 'Task version: {{version}}'