From f20b7d5027aa9c69fe0f7db1e83d3ef4b8349c7c Mon Sep 17 00:00:00 2001 From: Johan Nordberg Date: Wed, 24 Mar 2021 08:32:03 +0900 Subject: [PATCH] Add publish target --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index eaf73d6..973bda4 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,13 @@ ci-lint: node_modules node_modules: yarn install --non-interactive --frozen-lockfile --ignore-scripts +.PHONY: publish +publish: | distclean node_modules + @git diff-index --quiet HEAD || (echo "Uncommitted changes, please commit first" && exit 1) + @git fetch origin && git diff origin/master --quiet || (echo "Changes not pushed to origin, please push first" && exit 1) + @yarn config set version-tag-prefix "" && yarn config set version-git-message "Version %s" + @yarn publish && git push && git push --tags + .PHONY: clean clean: rm -rf lib/ coverage/