-
Notifications
You must be signed in to change notification settings - Fork 1
/
forge.yaml
49 lines (49 loc) · 1.16 KB
/
forge.yaml
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
46
47
48
49
project:
name: train
steps:
build:
help: Build the project
envs:
CGO_ENABLED: 0
GOOS: '{{.Os}}'
cmd: >
go build -ldflags
"-X 'github.com/gomicro/train/cmd.Version=dev-{{.ShortSha}}'
-X 'github.com/gomicro/train/cmd.clientID=$TRAIN_CLIENT_ID'
-X 'github.com/gomicro/train/cmd.clientSecret=$TRAIN_CLIENT_SECRET'"
-o {{.Project}} .
clean:
help: Clean up all generated files
cmd: go clean
fmt:
help: Run gofmt
cmd: go fmt ./...
linters:
help: Run all the linters
steps:
- lint
- fmt
- vet
lint:
help: Run golangci-lint
cmd: golangci-lint run
install:
help: Install the binary
envs:
CGO_ENABLED: 0
GOOS: '{{.Os}}'
cmd: >
go install -ldflags
"-X 'github.com/gomicro/train/cmd.Version=dev-$(git rev-parse --short HEAD)'
-X 'github.com/gomicro/train/cmd.clientID=$TRAIN_CLIENT_ID'
-X 'github.com/gomicro/train/cmd.clientSecret=$TRAIN_CLIENT_SECRET'"
test:
help: Run all available tests
steps:
- unit test
unit_test:
help: Run the unit tests
cmd: go test ./...
vet:
help: Run go vet
cmd: go vet ./...