bunker/Taskfile.yml
Stanislav N. aka pztrn 3cfc74affa
All checks were successful
Linting and tests / Linting (push) Successful in 6s
Client build scripts fixes and server stub with local devzone.
2025-09-13 18:13:50 +05:00

46 lines
972 B
YAML

---
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.Version={{.VERSION}}' -X 'bunker/commons.Branch={{.BRANCH}}' -X 'bunker/commons.Commit={{.COMMIT}}' -X 'bunker/commons.Build={{.BUILD}}' -X 'bunker/commons.BuildDate={{.BUILD_DATE}}'"
env:
GOFLAGS: "-trimpath"
includes:
client: ./client
server: ./server
tasks:
cleanup:
desc: "Cleanup _build directory."
cmds:
- task: server:cmd:bunkerd:cleanup
ensure-builddir:
internal: true
cmds:
- mkdir -p _build
lint:
desc: "Lints whole workspace."
cmds:
- golangci-lint run
test:
desc: "Test whole workspace"
cmds:
- go test -test.v ./...