2019-07-07 19:18:02 +02:00
|
|
|
version: '3'
|
2018-03-04 21:20:26 +02:00
|
|
|
|
2019-01-02 17:42:06 +02:00
|
|
|
includes:
|
2020-02-16 16:20:53 +02:00
|
|
|
docs:
|
|
|
|
taskfile: ./docs
|
|
|
|
dir: ./docs
|
2019-01-02 17:42:06 +02:00
|
|
|
|
2018-04-07 19:42:24 +02:00
|
|
|
vars:
|
|
|
|
GIT_COMMIT:
|
|
|
|
sh: git log -n 1 --format=%h
|
|
|
|
|
|
|
|
GO_PACKAGES:
|
2018-07-15 20:42:46 +02:00
|
|
|
sh: go list ./...
|
2018-04-07 19:42:24 +02:00
|
|
|
|
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:
|
2018-03-11 20:31:27 +02:00
|
|
|
- goreleaser --snapshot --rm-dist
|
2018-03-04 21:20:26 +02:00
|
|
|
|
2018-04-07 20:07:43 +02:00
|
|
|
generate-install-script:
|
2018-09-25 02:52:14 +02:00
|
|
|
desc: Generate install script using https://github.com/goreleaser/godownloader
|
2018-04-07 20:07:43 +02:00
|
|
|
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:07:43 +02:00
|
|
|
|
2018-04-07 20:36:37 +02:00
|
|
|
ci:
|
2019-12-08 02:28:02 +02:00
|
|
|
- task: go-get
|
|
|
|
vars: {REPO: golang.org/x/lint/golint}
|
|
|
|
- task: lint
|
|
|
|
- task: test
|
2018-04-07 20:36:37 +02:00
|
|
|
|
2019-12-08 02:28:02 +02:00
|
|
|
go-get: go get -u {{.REPO}}
|
2018-07-15 20:42:46 +02:00
|
|
|
|
|
|
|
packages:
|
|
|
|
cmds:
|
|
|
|
- echo '{{.GO_PACKAGES}}'
|
|
|
|
silent: true
|