-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
45 lines (36 loc) · 1.02 KB
/
Copy pathTaskfile.yml
File metadata and controls
45 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: "3"
vars:
NAME: spin
BIN: ./bin/{{.NAME}}
VERSION:
sh: git describe --tags --abbrev=0 2>/dev/null || echo "0.1.0"
env:
CGO_ENABLED: "0"
tasks:
default:
cmds:
- task: build
build:
desc: Build the spin binary
cmds:
- go build -ldflags "-X github.com/sam0uly/spin/internal/version.Version={{.VERSION}}" -o {{.BIN}} .
test:
desc: Run unit and integration tests
cmds:
- go test ./... -count=1
lint:
desc: Run golangci-lint
cmds:
- test -x "$(go env GOPATH)/bin/golangci-lint" && golangci-lint run ./... || echo "golangci-lint not installed; skipping"
fmt:
desc: Format Go source and run golangci-lint formatters
cmds:
- go fmt ./...
- test -x "$(go env GOPATH)/bin/golangci-lint" && golangci-lint fmt ./... || echo "golangci-lint not installed; skipping"
install:
desc: Build and move spin binary to go bin dir
cmds:
- go build -o spin main.go && mv spin ~/go/bin/
clean:
cmds:
- rm -rf ./bin ./tmp ./dist ./.tmp