vendor/github.com/spf13/cobra/Makefile
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
child 265 05c40b36d3b2
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
     7 
     7 
     8 ifeq (, $(shell which richgo))
     8 ifeq (, $(shell which richgo))
     9 $(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
     9 $(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
    10 endif
    10 endif
    11 
    11 
    12 .PHONY: fmt lint test cobra_generator install_deps clean
    12 .PHONY: fmt lint test install_deps clean
    13 
    13 
    14 default: all
    14 default: all
    15 
    15 
    16 all: fmt test cobra_generator
    16 all: fmt test
    17 
    17 
    18 fmt:
    18 fmt:
    19 	$(info ******************** checking formatting ********************)
    19 	$(info ******************** checking formatting ********************)
    20 	@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)
    20 	@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)
    21 
    21 
    22 lint:
    22 lint:
    23 	$(info ******************** running lint tools ********************)
    23 	$(info ******************** running lint tools ********************)
    24 	golangci-lint run -v
    24 	golangci-lint run -v
    25 
    25 
    26 test: install_deps lint
    26 test: install_deps
    27 	$(info ******************** running tests ********************)
    27 	$(info ******************** running tests ********************)
    28 	richgo test -v ./...
    28 	richgo test -v ./...
    29 
       
    30 cobra_generator: install_deps
       
    31 	$(info ******************** building generator ********************)
       
    32 	mkdir -p $(BIN)
       
    33 	make -C cobra all
       
    34 
    29 
    35 install_deps:
    30 install_deps:
    36 	$(info ******************** downloading dependencies ********************)
    31 	$(info ******************** downloading dependencies ********************)
    37 	go get -v ./...
    32 	go get -v ./...
    38 
    33