background (mostly back-end), loves Go, databases and tooling Ruby on Rails PostgreSQL React.js Go Started on Open Source by contributing to the Rails Guides Other projects came as the need appeared: go-testfixtures Task Andrey Nering - Joinville, Santa Catarina
stuff) Build your apps Run linting / formatting / tests Shipping stuff Handle Docker images (build, run, ship, etc) Run auxiliary servers (PostgreSQL, Redis, OpenSearch/Elasticsearch, etc) Simple deploys etc. It’s a task runner that you can use to automate stuff from the command line:
works I wanted something fast! (Zero delay when running a task) I looked for tools in the area and didn’t like them Make didn’t work well for me No ideal support for Windows .PHONY and other annoyances Caching based on files timestamp instead of content Other tools were difficult to learn Other tools had undesired dependencies (Python, etc) Task is a single binary I had free time in a holiday and was motivated to work on something new and fun 🙂
be named one of these (in order of priority): Taskfile.yml taskfile.yml Taskfile.yaml taskfile.yaml Taskfile.dist.yml taskfile.dist.yml Taskfile.dist.yaml taskfile.dist.yaml
go generate ./... - go build -o my_app ./cmd/app/main.go fmt: cmds: - gofumpt -l -w . tidy: cmds: - go mod tidy lint: cmds: - golangci-lint run test: cmds: - go test ./...
commands - go generate ./... - go build -o my_app ./cmd/app/main.go # command fmt: gofumpt -l -w . tidy: go mod tidy lint: golangci-lint run test: go test ./...
my_app ./cmd/app/main.go fmt: gofumpt -l -w . tidy: go mod tidy lint: golangci-lint run test: go test ./... $ task --list-all task: Available tasks for this project: * build: * fmt: * lint: * test: * tidy:
source code summary: | Format the source code using gofumpt. For more information about gofumpt, visit https://github.com/mvdan/gofumpt cmds: - gofumpt -l -w . $ task --summary fmt task: fmt Format the source code using gofumpt. For more information about gofumpt, visit https://github.com/mvdan/gofumpt commands: - gofumpt -l -w .
running if the sources haven’t changed since the last run. The .task dir stores metadata and should be added to .gitignore . version: '3' tasks: build: cmds: - go build -o my_app ./cmd/app/main.go sources: # <-- input files - ./**/*.go generates: # <-- output files - ./my_app $ task build task: [build] go build -o my_app ./cmd/app/main.go $ task build task: Task "build" is up to date
that doesn’t exist or is not so good Do not give up, persist on the long term (Task exists for 8 years) Have great documentation The easiest to get started, the best Examples, examples, examples! Find great co-maintainers (this is hard!) @pd93 🇬🇧 @vmaerten 🇫🇷