forked from polydawn/hroot
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgoad
More file actions
executable file
·47 lines (32 loc) · 816 Bytes
/
goad
File metadata and controls
executable file
·47 lines (32 loc) · 816 Bytes
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
#!/bin/bash
# Where is this script located?
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
export GOPATH="$PWD"/.gopath/
export BASEDIR="$PWD"
prefix="polydawn.net/docket"
packages=()
packages+=("$prefix/crocker")
packages+=("$prefix/dex")
packages+=("$prefix/util")
packages+=("$prefix/conf")
function build {
go build -race -o docket $prefix/main
}
function test {
echo "${packages[@]}" | xargs go test -race
# `go help packages` claims that "polydawn.net/docket/..." is a valid way to ask to test all packages.
# evidentally this is a lie.
}
case "$1" in
build)
build
;;
test)
test
;;
*)
echo "Usage: $0 {build|test}" 1>&2;
exit 1
;;
esac