Add release and publish Make targets
This commit is contained in:
parent
518d1f5605
commit
b7a5839216
1 changed files with 12 additions and 1 deletions
13
Makefile
13
Makefile
|
@ -1,4 +1,4 @@
|
|||
.PHONY: build clean update-npmjs-readme
|
||||
.PHONY: build clean update-npmjs-readme release publish
|
||||
|
||||
build: node_modules
|
||||
npm run build
|
||||
|
@ -9,6 +9,17 @@ node_modules:
|
|||
clean:
|
||||
rm -r target node_modules
|
||||
|
||||
release:
|
||||
@read -p "Enter version bump (patch, minor, major): " bump && \
|
||||
version=$$(npm version $$bump | grep -oP "(?<=v)[^']+") && \
|
||||
echo "Version $$version created. Run 'make publish' to push the changes and publish the package."
|
||||
|
||||
|
||||
update-npmjs-readme:
|
||||
asciidoctor -b docbook -o target/README.xml README.adoc
|
||||
pandoc -f docbook -t markdown_strict target/README.xml -o README.md
|
||||
|
||||
publish: update-npmjs-readme
|
||||
@git push && \
|
||||
git push --tags && \
|
||||
npm publish
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue