forked from nautilus/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tasks.hcl
46 lines (39 loc) · 1.23 KB
/
_tasks.hcl
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
task "install:ci" {
description = "Install the necessary dependencies to run in CI. does not run `install`"
command = <<EOF
go get \
github.com/tcnksm/ghr \
github.com/mitchellh/gox
EOF
}
task "install" {
description = "Install the dependencies to develop locally"
command = "go get -v {% .files %}"
}
task "tests" {
description = "Run the tests"
command = "go test {% .files %}"
}
task "tests:coverage" {
description = "Run the tests, generate a coverage report, and report it to coveralls"
pipeline = [
"go test -v -covermode=atomic -coverprofile=coverage.out {% .files %}",
]
}
task "build" {
description = "Build executable in all supported architectures"
command = <<EOF
gox -os="linux darwin windows" -arch=amd64 -output="bin/gateway_{{.OS}}_{{.Arch}}" -verbose ./cmd/...
EOF
}
task "deploy" {
description = "Push the built artifacts to the release. assumes its running in CI"
command = "ghr -t $GITHUB_TOKEN -u nautilus -r gateway $VERSION ./bin"
}
variables {
files = "$(go list -v ./... | grep -iEv \"cmd|examples\")"
}
config {
// have to change the template delimiters to support gox
delimiters = ["{%", "%}"]
}