diff options
-rw-r--r-- | client/go/.gitignore | 1 | ||||
-rw-r--r-- | client/go/Makefile | 15 | ||||
-rwxr-xr-x | client/go/build.sh | 7 |
3 files changed, 16 insertions, 7 deletions
diff --git a/client/go/.gitignore b/client/go/.gitignore index e660fd93d31..43fd09cd9d2 100644 --- a/client/go/.gitignore +++ b/client/go/.gitignore @@ -1 +1,2 @@ bin/ +!Makefile diff --git a/client/go/Makefile b/client/go/Makefile new file mode 100644 index 00000000000..db16b495b74 --- /dev/null +++ b/client/go/Makefile @@ -0,0 +1,15 @@ +# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +all: test checkfmt install + +install: + env GOBIN=$(PWD)/bin go install ./... + +test: + go test ./... + +checkfmt: + @bash -c "diff --line-format='%L' <(echo -n) <(gofmt -l .)" || { echo "one or more files need to be formatted: try make fmt to fix this automatically"; exit 1; } + +fmt: + gofmt -w . diff --git a/client/go/build.sh b/client/go/build.sh deleted file mode 100755 index 6d9416e8950..00000000000 --- a/client/go/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -# Execute from this directory to build the command-line client to bin/vespa -export GOBIN=`pwd`/bin -go test ./... -go install - |