diff options
| author | Fuwn <[email protected]> | 2026-01-30 20:39:13 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-30 20:39:13 -0800 |
| commit | 898bc844bc4bbdbb2cc85642be2c3da3885664ea (patch) | |
| tree | 9498990f9723e1cd0a0023f57882dc4fed6039d4 /Go.yaml | |
| parent | docs: Add a README (diff) | |
| download | taskfiles-898bc844bc4bbdbb2cc85642be2c3da3885664ea.tar.xz taskfiles-898bc844bc4bbdbb2cc85642be2c3da3885664ea.zip | |
Diffstat (limited to 'Go.yaml')
| -rw-r--r-- | Go.yaml | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -0,0 +1,54 @@ +version: "3" + +tasks: + default: + desc: Build the application + cmds: + - task: build + + build: + desc: Build the binary with optimisations + cmds: + - go build -ldflags="-s -w" -o {{.BINARY}} . + sources: + - ./**/*.go + generates: + - ./{{.BINARY}} + + run: + desc: Build and run the application + deps: [build] + cmds: + - ./{{.BINARY}} + + install: + desc: Install the binary to GOPATH/bin + deps: [build] + cmds: + - cp {{.BINARY}} ${GOPATH:-~/go}/bin/{{.BINARY}} + + clean: + desc: Remove build artifacts + cmds: + - rm -f {{.BINARY}} + - go clean + + test: + desc: Run tests + cmds: + - go test ./... + + fmt: + desc: Format code + cmds: + - iku -w . || go fmt ./... + + lint: + desc: Run linter + cmds: + - golangci-lint run + + dev: + desc: Build and run in development mode + cmds: + - go run . |