#21 make release-* targets optional/configurable

Closed
opened 4 years ago by kmohrf · 2 comments
kmohrf commented 4 years ago

sometimes I would like to use other tools to control new releases for instance npm.

my favorite solution would be if makefilet would use bumpversion if there is a .bumpversion.cfg and npm if there is a package.json file. In that case CURRENT_VERSION_FILE would be optional and get_current_version would be something like get_current_version = $(shell jq -er '.version // "unknown"' package.json).

a minimal solution would be the possibility to entirely disable the inclusion of the release.mk file.

sometimes I would like to use other tools to control new releases for instance npm. my favorite solution would be if makefilet would use bumpversion if there is a `.bumpversion.cfg` and npm if there is a `package.json` file. In that case `CURRENT_VERSION_FILE` would be optional and `get_current_version` would be something like `get_current_version = $(shell jq -er '.version // "unknown"' package.json)`. a minimal solution would be the possibility to entirely disable the inclusion of the release.mk file.
kmohrf commented 4 years ago
Poster

I have figured out a reasonable way to use npm as-is:

# Makefile
include make.d/release.mk
include make.d/makefilet.mk

get_current_version = $(shell jq -er '.version // "unknown"' package.json)
# make.d/release.mk
BUMP_VERSION_COMMIT_FILES = VERSION package.json package-lock.json

release-debchange: release-npm

.PHONY: release-npm
release-npm:
    npm --no-git-tag-version version "$(VERSION_BUMP)"
    echo $(call get_current_version) > VERSION
I have figured out a reasonable way to use npm as-is: ```Makefile # Makefile include make.d/release.mk include make.d/makefilet.mk get_current_version = $(shell jq -er '.version // "unknown"' package.json) ``` ```Makefile # make.d/release.mk BUMP_VERSION_COMMIT_FILES = VERSION package.json package-lock.json release-debchange: release-npm .PHONY: release-npm release-npm: npm --no-git-tag-version version "$(VERSION_BUMP)" echo $(call get_current_version) > VERSION ```
sumpfralle commented 3 years ago
Owner

fixed in 6cc513bba9

fixed in 6cc513bba90da1af83f19ff640918d881fa62af3
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.