1
0
mirror of https://github.com/go-task/task.git synced 2024-12-12 10:45:49 +02:00
task/Taskfile.yml

83 lines
1.6 KiB
YAML
Raw Normal View History

2019-07-07 19:18:02 +02:00
version: '3'
2018-03-04 21:20:26 +02:00
includes:
2020-02-16 16:20:53 +02:00
docs:
taskfile: ./docs
dir: ./docs
vars:
GIT_COMMIT:
sh: git log -n 1 --format=%h
GO_PACKAGES:
2018-07-15 20:42:46 +02:00
sh: go list ./...
2018-03-04 21:20:26 +02:00
tasks:
2018-07-15 20:42:46 +02:00
default:
cmds:
- task: test
2018-03-04 21:20:26 +02:00
install:
desc: Installs Task
cmds:
- go install -v -ldflags="-w -s -X main.version={{.GIT_COMMIT}}" ./cmd/task
2018-06-16 19:24:50 +02:00
env:
CGO_ENABLED: '0'
2018-03-04 21:20:26 +02:00
dl-deps:
desc: Downloads cli dependencies
cmds:
2018-04-07 20:36:37 +02:00
- task: go-get
2018-10-13 23:29:23 +02:00
vars: {REPO: golang.org/x/lint/golint}
2018-04-07 20:36:37 +02:00
- task: go-get
vars: {REPO: github.com/goreleaser/goreleaser}
- task: go-get
vars: {REPO: github.com/goreleaser/godownloader}
2018-03-04 21:20:26 +02:00
update-deps:
desc: Updates dependencies
cmds:
- dep ensure
- dep ensure -update
clean:
desc: Cleans temp files and folders
cmds:
- rm -rf dist/
lint:
desc: Runs golint
cmds:
2018-07-15 20:42:46 +02:00
- golint {{catLines .GO_PACKAGES}}
2018-03-04 21:20:26 +02:00
silent: true
test:
desc: Runs test suite
deps: [install]
cmds:
2018-07-15 20:42:46 +02:00
- go test {{catLines .GO_PACKAGES}}
2018-03-04 21:20:26 +02:00
test-release:
desc: Tests release process without publishing
cmds:
- goreleaser --snapshot --rm-dist
2018-03-04 21:20:26 +02:00
generate-install-script:
2018-09-25 02:52:14 +02:00
desc: Generate install script using https://github.com/goreleaser/godownloader
cmds:
- godownloader --repo go-task/task -o install-task.sh
2018-09-25 02:34:10 +02:00
- cp ./install-task.sh ./docs/install.sh
2018-04-07 20:36:37 +02:00
ci:
- task: go-get
vars: {REPO: golang.org/x/lint/golint}
- task: lint
- task: test
2018-04-07 20:36:37 +02:00
go-get: go get -u {{.REPO}}
2018-07-15 20:42:46 +02:00
packages:
cmds:
- echo '{{.GO_PACKAGES}}'
silent: true