35 lines
831 B
YAML
35 lines
831 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/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
|
|
|
|
lint:
|
|
desc: "Lints whole workspace."
|
|
cmds:
|
|
- golangci-lint run client/...
|