github.com/halhenke/ghq@v0.8.1-0.20180207100234-7e68f823b46d/Makefile (about)

     1  GO = go
     2  
     3  VERBOSE_FLAG = $(if $(VERBOSE),-v)
     4  
     5  VERSION = $$(git describe --tags --always --dirty) ($$(git name-rev --name-only HEAD))
     6  
     7  BUILD_FLAGS = -ldflags "\
     8  	      -X \"main.Version=$(VERSION)\" \
     9  	      "
    10  
    11  build: deps
    12  	$(GO) build $(VERBOSE_FLAG) $(BUILD_FLAGS)
    13  
    14  test: testdeps
    15  	$(GO) test $(VERBOSE_FLAG) $($(GO) list ./... | grep -v '^github.com/motemen/ghq/vendor/')
    16  
    17  deps:
    18  	$(GO) get -d $(VERBOSE_FLAG)
    19  
    20  testdeps:
    21  	$(GO) get -d -t $(VERBOSE_FLAG)
    22  
    23  install: deps
    24  	$(GO) install $(VERBOSE_FLAG) $(BUILD_FLAGS)
    25  
    26  bump-minor:
    27  	git diff --quiet && git diff --cached --quiet
    28  	new_version=$$(gobump minor -w -r -v) && \
    29  	test -n "$$new_version" && \
    30  	git commit -a -m "bump version to $$new_version" && \
    31  	git tag v$$new_version
    32  
    33  .PHONY: build test deps testdeps install