makefile consolidations

pull/207/head
Michelle Noorali 9 years ago
parent ef665993dd
commit 46588cd9dd

@ -9,5 +9,4 @@ install:
- sudo pip install -r expandybird/requirements.txt - sudo pip install -r expandybird/requirements.txt
script: script:
- make setup-gotools - make setup-gotools test
- make test

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
include include.mk
SUBDIRS := expandybird/. resourcifier/. manager/. SUBDIRS := expandybird/. resourcifier/. manager/.
TARGETS := all build test push container clean TARGETS := all build test push container clean
@ -34,10 +36,6 @@ clean:
test: build test: build
go test -v $(GO_DEPS) go test -v $(GO_DEPS)
.PHONY: setup-gotools
setup-gotools:
$(SETUP_GOTOOLS)
push: container push: container
container: .project .docker container: .project .docker
@ -52,4 +50,3 @@ $(TARGETS) : % : $(addsuffix %,$(SUBDIRS))
$(SUBDIRS_TARGETS) : $(SUBDIRS_TARGETS) :
$(MAKE) -C $(@D) $(@F:.%=%) $(MAKE) -C $(@D) $(@F:.%=%)

@ -51,19 +51,3 @@ clean:
.PHONY: test .PHONY: test
test: lint vet test-unit test: lint vet test-unit
.PHONY: test-unit
test-unit:
$(GO_TEST)
.PHONY: lint
lint:
$(GO_LINT)
.PHONY: vet
vet:
$(GO_VET)
.PHONY: setup-gotools
setup-gotools:
$(SETUP_GOTOOLS)

@ -1,4 +1,21 @@
SETUP_GOTOOLS := @echo "Installing golint and vet" && go get -u github.com/golang/lint/golint && go get -u -v golang.org/x/tools/cmd/vet .PHONY: test-unit
GO_VET := @echo "Running go vet ..." && go vet ./... test-unit:
GO_LINT := @echo "Running golint ..." && golint ./... @echo Running tests...
GO_TEST := @echo "Running tests ..." && go test -v ./... go test -v ./...
.PHONY: lint
lint:
@echo Running golint...
golint ./...
.PHONY: vet
vet:
@echo Running go vet...
go vet ./...
.PHONY: setup-gotools
setup-gotools:
@echo Installing golint
go get -u github.com/golang/lint/golint
@echo Installing vet
go get -u -v golang.org/x/tools/cmd/vet

@ -45,19 +45,3 @@ clean:
.PHONY: test .PHONY: test
test: lint vet test-unit test: lint vet test-unit
.PHONY: test-unit
test-unit:
$(GO_TEST)
.PHONY: lint
lint:
$(GO_LINT)
.PHONY: vet
vet:
$(GO_VET)
.PHONY: setup-gotools
setup-gotools:
$(SETUP_GOTOOLS)

@ -47,19 +47,3 @@ clean:
.PHONY: test .PHONY: test
test: lint vet test-unit test: lint vet test-unit
.PHONY: test-unit
test-unit:
$(GO_TEST)
.PHONY: lint
lint:
$(GO_LINT)
.PHONY: vet
vet:
$(GO_VET)
.PHONY: setup-gotools
setup-gotools:
$(SETUP_GOTOOLS)

Loading…
Cancel
Save