Skip to content

Commit

Permalink
bump-version: remove sembump
Browse files Browse the repository at this point in the history
- sembump (github.com/jessfraz/junk/sembump) is unsupported by
  the author and won't build on mac/windows. Make NEW_VERSION explicit.
  • Loading branch information
jcodybaker committed Apr 26, 2019
1 parent 0147189 commit 6dd7a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
LDFLAGS ?= -X github.com/digitalocean/csi-digitalocean/driver.version=${VERSION} -X github.com/digitalocean/csi-digitalocean/driver.commit=${COMMIT} -X github.com/digitalocean/csi-digitalocean/driver.gitTreeState=${GIT_TREE_STATE}
PKG ?= github.com/digitalocean/csi-digitalocean/cmd/do-csi-plugin

## Bump the version in the version file. Set BUMP to [ major | minor | patch ]
BUMP := patch
VERSION ?= $(shell cat VERSION)

all: test
Expand All @@ -20,8 +18,8 @@ publish: compile build push clean

.PHONY: bump-version
bump-version:
@go get -u github.com/jessfraz/junk/sembump # update sembump tool
$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
@[ "${NEW_VERSION}" ] || ( echo "NEW_VERSION must be set (ex. make NEW_VERSION=v1.x.x bump-version)"; exit 1 )
@(echo ${NEW_VERSION} | grep -E "^v") || ( echo "NEW_VERSION must be a semver ('v' prefix is required)"; exit 1 )
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
@echo $(NEW_VERSION) > VERSION
@cp deploy/kubernetes/releases/csi-digitalocean-${VERSION}.yaml deploy/kubernetes/releases/csi-digitalocean-${NEW_VERSION}.yaml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Dependencies are managed via [Go modules](https://github.com/golang/go/wiki/Modu
To release a new version bump first the version:

```
$ make bump-version
$ make NEW_VERSION=v1.0.0 bump-version
```

Make sure everything looks good. Create a new branch with all changes:
Expand Down

0 comments on commit 6dd7a6d

Please sign in to comment.