Skip to content

Commit

Permalink
Allow bumpversion to have an explicit version
Browse files Browse the repository at this point in the history
via `make bumpversion NEXT_VERSION=0.1.0`
  • Loading branch information
cplee authored Apr 20, 2018
1 parent d150611 commit 4523041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION := $(shell git tag -l --sort=creatordate | grep "^v[0-9]*.[0-9]*.[0-9]*$
MAJOR_VERSION := $(word 1, $(subst ., ,$(VERSION)))
MINOR_VERSION := $(word 2, $(subst ., ,$(VERSION)))
PATCH_VERSION := $(word 3, $(subst ., ,$(VERSION)))
NEXT_VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(shell echo $(PATCH_VERSION)+1|bc)
NEXT_VERSION ?= $(MAJOR_VERSION).$(MINOR_VERSION).$(shell echo $(PATCH_VERSION)+1|bc)

BUILD_DIR = .release
GOLDFLAGS = "-X main.version=$(NEXT_VERSION)"
Expand Down

0 comments on commit 4523041

Please sign in to comment.