forked from ahoy-cli/ahoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ahoy.yml
73 lines (71 loc) · 1.79 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
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:
cmd: "go install"
usage: Build ahoy using go install.
bats:
usage: "Run the bats bash testing command."
cmd: |
bats tests
test:
usage: Run automated tests
cmd: |
ahoy build
FAIL=false
TESTS=(
'go vet'
'go test -v -race '
'golint -set_exit_status'
'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
godep:
usage: Go dependency manager (godep)
cmd: |
godep="$(which godep)"
if [ ! "$godep" ]; then
echo "godep not found, installing it first using:"
echo "OSX: brew install godep"
echo "other: go get github.com/tools/godep"
else
godep "$@"
fi
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