Skip to content

Commit

Permalink
add version number to release binary
Browse files Browse the repository at this point in the history
  • Loading branch information
davecheney committed Sep 29, 2016
1 parent 466cfde commit 66e42f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ TARGETS = linux-386 linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-386 w
COMMAND_NAME = httpstat
PACKAGE_NAME = github.com/davecheney/$(COMMAND_NAME)
LDFLAGS = -ldflags=-X=main.version=$(VERSION)
OBJECTS = $(patsubst $(COMMAND_NAME)-windows-amd64,$(COMMAND_NAME)-windows-amd64.exe, $(patsubst $(COMMAND_NAME)-windows-386,$(COMMAND_NAME)-windows-386.exe, $(patsubst %,$(COMMAND_NAME)-%, $(TARGETS))))
OBJECTS = $(patsubst $(COMMAND_NAME)-windows-amd64%,$(COMMAND_NAME)-windows-amd64%.exe, $(patsubst $(COMMAND_NAME)-windows-386,$(COMMAND_NAME)-windows-386.exe, $(patsubst %,$(COMMAND_NAME)-%-v$(VERSION), $(TARGETS))))

release: check-env $(OBJECTS) ## Build release binaries (requires VERSION)

clean: ## Remove release binaries
clean: check-env ## Remove release binaries
rm $(OBJECTS)

$(OBJECTS): $(wildcard *.go)
Expand Down

0 comments on commit 66e42f5

Please sign in to comment.