2016-10-24 20:32:22 +03:00
|
|
|
.NOTPARALLEL:
|
|
|
|
|
2017-03-09 02:04:50 +03:00
|
|
|
.PHONY: prereqs build test test_fmt validate-generated fmt lint ci devenv
|
2017-01-10 23:29:27 +03:00
|
|
|
|
2017-03-21 08:55:10 +03:00
|
|
|
VERSION=`git describe --always --long --dirty`
|
|
|
|
BUILD=`date +%FT%T%z`
|
|
|
|
|
2017-05-17 23:06:24 +03:00
|
|
|
# this isn't particularly pleasant, but it works with the least amount
|
|
|
|
# of requirements around $GOPATH. The extra sed is needed because `gofmt`
|
|
|
|
# operates on paths, go list returns package names, and `go fmt` always rewrites
|
|
|
|
# which is not what we need to do in the `test_fmt` target.
|
|
|
|
GOFILES=`go list ./... | grep -v "github.com/Azure/acs-engine/vendor" | sed 's|github.com/Azure/acs-engine|.|g' | grep -v -w '^.$$'`
|
|
|
|
|
2017-05-10 01:50:19 +03:00
|
|
|
all: build
|
|
|
|
|
2017-02-22 00:40:31 +03:00
|
|
|
prereqs:
|
2017-05-17 23:06:24 +03:00
|
|
|
go get github.com/Masterminds/glide
|
2017-02-09 22:18:57 +03:00
|
|
|
go get github.com/jteeuwen/go-bindata/...
|
2017-05-17 23:06:24 +03:00
|
|
|
glide install
|
|
|
|
|
2017-06-21 04:45:26 +03:00
|
|
|
build:
|
2017-05-17 23:06:24 +03:00
|
|
|
go generate -v $(GOFILES)
|
2017-05-10 01:50:19 +03:00
|
|
|
go build -v -ldflags="-X github.com/Azure/acs-engine/cmd.BuildSHA=${VERSION} -X github.com/Azure/acs-engine/cmd.BuildTime=${BUILD}"
|
2017-03-08 00:06:32 +03:00
|
|
|
cd test/acs-engine-test; go build -v
|
2016-10-24 20:32:22 +03:00
|
|
|
|
2017-05-30 03:26:06 +03:00
|
|
|
test: test_fmt
|
2017-05-17 23:06:24 +03:00
|
|
|
go test -v $(GOFILES)
|
2016-10-24 20:32:22 +03:00
|
|
|
|
2017-05-30 03:26:06 +03:00
|
|
|
.PHONY: test-style
|
|
|
|
test-style:
|
|
|
|
@scripts/validate-go.sh
|
2017-03-09 02:04:50 +03:00
|
|
|
|
2017-07-14 00:12:07 +03:00
|
|
|
ci: prereqs build test lint
|
2016-10-24 20:32:22 +03:00
|
|
|
|
2016-10-27 01:41:17 +03:00
|
|
|
devenv:
|
2017-05-16 00:10:29 +03:00
|
|
|
./scripts/devenv.sh
|