mirror of
https://github.com/go-task/task.git
synced 2025-07-17 01:43:07 +02:00
Optimize the Taskfile a bit
`go list ./...` takes quite a few seconds to run. Let's restrict it to the tasks that actually use it.
This commit is contained in:
19
Taskfile.yml
19
Taskfile.yml
@ -6,13 +6,6 @@ includes:
|
|||||||
taskfile: ./docs
|
taskfile: ./docs
|
||||||
dir: ./docs
|
dir: ./docs
|
||||||
|
|
||||||
vars:
|
|
||||||
GIT_COMMIT:
|
|
||||||
sh: git log -n 1 --format=%h
|
|
||||||
|
|
||||||
GO_PACKAGES:
|
|
||||||
sh: go list ./...
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: '0'
|
CGO_ENABLED: '0'
|
||||||
|
|
||||||
@ -29,6 +22,9 @@ tasks:
|
|||||||
- './**/*.go'
|
- './**/*.go'
|
||||||
cmds:
|
cmds:
|
||||||
- go install -v -ldflags="-w -s -X main.version={{.GIT_COMMIT}}" ./cmd/task
|
- go install -v -ldflags="-w -s -X main.version={{.GIT_COMMIT}}" ./cmd/task
|
||||||
|
vars:
|
||||||
|
GIT_COMMIT:
|
||||||
|
sh: git log -n 1 --format=%h
|
||||||
|
|
||||||
mod:
|
mod:
|
||||||
desc: Downloads and tidy Go modules
|
desc: Downloads and tidy Go modules
|
||||||
@ -73,12 +69,18 @@ tasks:
|
|||||||
deps: [install]
|
deps: [install]
|
||||||
cmds:
|
cmds:
|
||||||
- go test {{catLines .GO_PACKAGES}}
|
- go test {{catLines .GO_PACKAGES}}
|
||||||
|
vars:
|
||||||
|
GO_PACKAGES:
|
||||||
|
sh: go list ./...
|
||||||
|
|
||||||
test:all:
|
test:all:
|
||||||
desc: Runs test suite with signals and watch tests included
|
desc: Runs test suite with signals and watch tests included
|
||||||
deps: [install, sleepit:build]
|
deps: [install, sleepit:build]
|
||||||
cmds:
|
cmds:
|
||||||
- go test {{catLines .GO_PACKAGES}} -tags 'signals watch'
|
- go test {{catLines .GO_PACKAGES}} -tags 'signals watch'
|
||||||
|
vars:
|
||||||
|
GO_PACKAGES:
|
||||||
|
sh: go list ./...
|
||||||
|
|
||||||
test-release:
|
test-release:
|
||||||
desc: Tests release process without publishing
|
desc: Tests release process without publishing
|
||||||
@ -106,4 +108,7 @@ tasks:
|
|||||||
packages:
|
packages:
|
||||||
cmds:
|
cmds:
|
||||||
- echo '{{.GO_PACKAGES}}'
|
- echo '{{.GO_PACKAGES}}'
|
||||||
|
vars:
|
||||||
|
GO_PACKAGES:
|
||||||
|
sh: go list ./...
|
||||||
silent: true
|
silent: true
|
||||||
|
Reference in New Issue
Block a user