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

96 lines
1.9 KiB
YAML
Raw Normal View History

2018-03-04 21:20:26 +02:00
version: '2'
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
vendor:
desc: Sync vendor/ directory according to go.mod file
cmds:
- go mod vendor
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:
cmds:
- 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: lint
- task: test
go-get:
cmds:
- go get -u {{.REPO}}
2018-07-15 20:42:46 +02:00
packages:
cmds:
- echo '{{.GO_PACKAGES}}'
silent: true
2018-09-22 23:44:24 +02:00
docs:install:
desc: Installs docsify to work the on the documentation site
cmds:
- npm install docsify-cli -g
docs:serve:
desc: Serves the documentation site locally
cmds:
- docsify serve docs