aboutsummaryrefslogtreecommitdiff
path: root/Go.yaml
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-30 20:39:13 -0800
committerFuwn <[email protected]>2026-01-30 20:39:13 -0800
commit898bc844bc4bbdbb2cc85642be2c3da3885664ea (patch)
tree9498990f9723e1cd0a0023f57882dc4fed6039d4 /Go.yaml
parentdocs: Add a README (diff)
downloadtaskfiles-898bc844bc4bbdbb2cc85642be2c3da3885664ea.tar.xz
taskfiles-898bc844bc4bbdbb2cc85642be2c3da3885664ea.zip
feat: Add Taskfile for GoHEADmain
Diffstat (limited to 'Go.yaml')
-rw-r--r--Go.yaml54
1 files changed, 54 insertions, 0 deletions
diff --git a/Go.yaml b/Go.yaml
new file mode 100644
index 0000000..f0204ed
--- /dev/null
+++ b/Go.yaml
@@ -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 .