aboutsummaryrefslogtreecommitdiff
path: root/Taskfile.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'Taskfile.yaml')
-rw-r--r--Taskfile.yaml47
1 files changed, 47 insertions, 0 deletions
diff --git a/Taskfile.yaml b/Taskfile.yaml
new file mode 100644
index 0000000..e4481e8
--- /dev/null
+++ b/Taskfile.yaml
@@ -0,0 +1,47 @@
+version: "3"
+
+vars:
+ BINARY: deppa
+
+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
+
+ fmt:
+ desc: Format code
+ cmds:
+ - iku -w . || go fmt ./...
+
+ lint:
+ desc: Run linter
+ cmds:
+ - golangci-lint run