add makefile
This commit is contained in:
parent
5e6863e4e6
commit
2b2dcd2036
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Target to increment the version
|
||||||
|
bump-version:
|
||||||
|
@jq '.version |= (. | split(".") | .[2] |= (tonumber + 1 | tostring) | join("."))' package.json > package.json.tmp
|
||||||
|
@mv package.json.tmp package.json
|
||||||
|
|
||||||
|
# Target to clean old tgz files
|
||||||
|
clean:
|
||||||
|
@rm -f *.tgz
|
||||||
|
|
||||||
|
git-commit:
|
||||||
|
$(eval NEW_VERSION := $(shell jq -r '.version' package.json))
|
||||||
|
@git add .
|
||||||
|
@git commit -m "Bump version to $(NEW_VERSION)"
|
||||||
|
|
||||||
|
# Target to execute npm pack
|
||||||
|
pack: clean bump-version git-commit
|
||||||
|
npm pack
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user