aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-31 04:45:33 +0000
committerFuwn <[email protected]>2026-01-31 04:45:36 +0000
commitbe6ea4881f224d13c1deb9d59479d2d86f4392a1 (patch)
tree2989168681d35f1e6c15889961a6b27cb8a79c6e
parentformat(flake.nix): Apply nixfmt formatting (diff)
downloadiku-be6ea4881f224d13c1deb9d59479d2d86f4392a1.tar.xz
iku-be6ea4881f224d13c1deb9d59479d2d86f4392a1.zip
chore: Add Taskfile and tasks
-rw-r--r--.gitignore1
-rw-r--r--Taskfile.yaml62
2 files changed, 63 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 076eff8..3f53f04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
iku
result
+.task
diff --git a/Taskfile.yaml b/Taskfile.yaml
new file mode 100644
index 0000000..f0da8b1
--- /dev/null
+++ b/Taskfile.yaml
@@ -0,0 +1,62 @@
+version: "3"
+
+vars:
+ BINARY: iku
+
+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 ./...
+
+ bench:
+ desc: Run benchmarks
+ cmds:
+ - go test -bench=. ./...
+
+ 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 .