-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
.ahoy.yml
76 lines (67 loc) · 1.66 KB
/
.ahoy.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ahoyapi: v2
commands:
build:
usage: Build ahoy with a version automatically set.
cmd: bash build.sh "$@"
build-all:
usage: Build all of the architecture and OSes that we support.
cmd: |
os_list=(darwin linux windows)
arch=amd64
for os in "${os_list[@]}"; do
echo "Building ahoy-bin-$os-$arch .."
env GOOS="$os" GOARCH="$arch" ahoy build -- -o "builds/ahoy-bin-$os-$arch"
if [ $? -ne 0 ]; then
"[Error]"
exit 1
fi
done
install:
usage: Build ahoy using go install.
cmd: "go install"
bats:
usage: "Run the bats bash testing command."
cmd: |
bats tests
test:
usage: Run automated tests.
cmd: |
FAIL=false
TESTS=(
'go vet'
'go test -v -race '
'bats tests'
)
for i in "${TESTS[@]}"; do
printf "\n=== TEST: $i ===\n\n"
$i
if [ $? -ne 0 ]; then
FAIL=true
fi
done
printf "\n=== RESULT ===\n\n"
# If any tests failed, then fail.
if [ $FAIL == true ]; then
echo "Some tests failed."
exit 1
else
echo "All tests passed."
fi
gomod:
usage: Fetch Go dependencies (go mod).
cmd: |
go mod tidy
go mod vendor
go mod verify
godep:
usage: Use "ahoy gomod" now to fetch Go dependencies (go mod).
cmd: ahoy gomod
gofmt:
usage: Clean up go code per code standards.
cmd: gofmt -w *.go
docs-build:
usage: Build the docs.
cmd: cd docs && make html
docs-deps:
usage: Install the dependencies from requirements.txt.
cmd: cd docs && pip install -r requirements.txt