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 displayname: Task
@ -12,14 +13,13 @@ provides:
build: build:
dependencies: dependencies:
go.dev: ^1.19 go.dev: ^1.19
working-directory: ${{prefix}}/bin script: go build -o {{prefix}}/bin/task -ldflags="$LDFLAGS" ./cmd/task
script: go install -ldflags="$LDFLAGS" github.com/go-task/task/v3/cmd/task@v{{version}}
env: env:
GOBIN: ${{prefix}}/bin GOBIN: ${{prefix}}/bin
LDFLAGS: LDFLAGS:
- -s - -s
- -w - -w
- -X main.Version={{version}} - -X github.com/go-task/task/v3/internal/version.version={{version}}
linux: linux:
# or segmentation fault # or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
@ -30,4 +30,4 @@ test:
script: | script: |
task --init task --init
test -f Taskfile.yml test -f Taskfile.yml
task --version | grep 'Task version: v{{version}}' task --version | grep 'Task version: {{version}}'