Fix for Makefile bug #30

This commit is contained in:
Vikram Rangnekar 2020-01-11 17:15:39 -05:00
parent 0d0d63d8d1
commit 1e31e33707
2 changed files with 53 additions and 47 deletions

View File

@ -25,13 +25,19 @@ test:
@go test -v ./...
BIN_DIR := $(GOPATH)/bin
GORICE := $(BIN_DIR)/github.com/GeertJohan/go.rice
GORICE := $(BIN_DIR)/rice
GOLANGCILINT := $(BIN_DIR)/golangci-lint
GITCHGLOG := $(BIN_DIR)/git-chglog
WEB_BUILD_DIR := ./web/build/manifest.json
$(GORICE):
@GO111MODULE=off go get -u github.com/GeertJohan/go.rice/rice
$(WEB_BUILD_DIR):
@echo "First install Yarn and create a build of the web UI found under ./web"
@echo "Command: cd web && yarn build"
@exit 1
$(GITCHGLOG):
@GO111MODULE=off go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
@ -49,7 +55,7 @@ LDFLAGS := -s -w
PLATFORMS := windows linux darwin
os = $(word 1, $@)
$(PLATFORMS): lint test gen
$(PLATFORMS): lint test
@mkdir -p release
@GOOS=$(os) GOARCH=amd64 go build $(BUILD_FLAGS) -o release/$(BINARY)-$(BUILD_VERSION)-$(os)-amd64
@ -59,10 +65,10 @@ all: lint test $(BINARY)
build: $(BINARY)
gen: $(GORICE)
gen: $(GORICE) $(WEB_BUILD_DIR)
@go generate ./...
$(BINARY): clean gen
$(BINARY): clean
@go build $(BUILD_FLAGS) -o $(BINARY)
clean:
@ -71,7 +77,7 @@ clean:
run: clean
@go run $(BUILD_FLAGS) main.go $(ARGS)
install: gen
install:
@echo $(GOPATH)
@echo "Commit Hash: `git rev-parse HEAD`"
@echo "Old Hash: `shasum $(GOPATH)/bin/$(BINARY) 2>/dev/null | cut -c -32`"

File diff suppressed because one or more lines are too long