-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.yaml
31 lines (31 loc) · 909 Bytes
/
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
project:
name: forge
steps:
build:
help: Compiles the project into a binary for the current system's OS
envs:
CGO_ENABLED: 0
GOOS: '{{.Os}}'
VERSION: '{{.ShortSha}}'
cmd: go build -ldflags "-X 'github.com/gomicro/forge/cmd.Version=$VERSION'" -o {{.Project}} .
coverage:
help: Generates the code coverage from all the tests
cmd: docker run gomicro/gocover
dockerize:
help: Build the forge docker image
cmds:
- GOOS=linux forge build
- docker build -t ghcr.io/gomicro/{{.Project}} .
install:
help: Installs the binary into GOBIN
envs:
CGO_ENABLED: 0
GOOS: '{{.Os}}'
VERSION: '{{.ShortSha}}'
cmd: go install -ldflags "-X 'github.com/gomicro/forge/cmd.Version=$VERSION'"
linters:
help: Run all the linters
cmd: golangci-lint run
test:
help: Run the unit tests for the project
cmd: go test ./...