bunker/Taskfile.yml

40 lines
913 B
YAML
Raw Normal View History

---
version: "3"
vars:
VERSION:
sh: scripts/version_generator.sh
CLIENT_VERSION:
sh: scripts/version_generator.sh client
BRANCH:
sh: git rev-parse --abbrev-ref HEAD
COMMIT:
sh: git rev-parse --short HEAD
BUILD:
sh: git rev-list --count HEAD
BUILD_DATE:
sh: TZ=UTC date +'%Y-%m-%d %H:%M:%S %Z'
BASIC_LDFLAGS: "-X 'bunker/commons/constants.Version={{.VERSION}}' -X 'bunker/commons/constants.Branch={{.BRANCH}}' -X 'bunker/commons/constants.Commit={{.COMMIT}}' -X 'bunker/commons/constants.Build={{.BUILD}}' -X 'bunker/commons/constants.BuildDate={{.BUILD_DATE}}'"
env:
GOFLAGS: "-trimpath"
includes:
client: ./client
tasks:
ensure-builddir:
internal: true
cmds:
- mkdir -p .build
2025-09-11 02:10:40 +05:00
lint:
desc: "Lints whole workspace."
cmds:
- golangci-lint run client/...
2025-09-11 02:30:15 +05:00
test:
desc: "Test whole workspace"
cmds:
- go test -test.v ./...