xair-cli/Taskfile.yml

51 lines
1001 B
YAML

version: '3'
includes:
build-xair: ./Taskfile.build-xair.yml
build-x32: ./Taskfile.build-x32.yml
vars:
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
BIN_DIR: bin
VERSION:
sh: 'git describe --tags $(git rev-list --tags --max-count=1)'
tasks:
default:
desc: Build the xair-cli and x32-cli projects for all platforms
cmds:
- task: build
build:
desc: Build the xair-cli and x32-cli projects for all platforms
deps: [vet]
cmds:
- task: build-xair:windows-amd64
- task: build-xair:linux-amd64
- task: build-xair:darwin-amd64
- task: build-x32:windows-amd64
- task: build-x32:linux-amd64
- task: build-x32:darwin-amd64
vet:
desc: Vet the code
deps: [fmt]
cmds:
- go vet ./...
fmt:
desc: Fmt the code
cmds:
- go fmt ./...
test:
desc: Run tests
cmds:
- go test ./...
clean:
desc: Clean the build artifacts
cmds:
- '{{.SHELL}} rm -r {{.BIN_DIR}}'