From ffabe20f3fe71c23db131161744cc14643960e2f Mon Sep 17 00:00:00 2001 From: mmisty Date: Fri, 2 Jun 2023 19:22:34 +0800 Subject: [PATCH] version --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5830093..0f1a792 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "build": "rm -rf dist && tsc --project tsconfig.build.json && cp package-publish.json ./dist/package.json && cp README-pack.md ./dist/README.md", "pack": "npm run build && cd dist && npm pack", "publish": "npm run publish:patch", - "publish:patch": "npm run prepublish && cd dist && npm version $(semver $(npm show . version) --increment -i patch) && npm publish", - "publish:minor": "npm run prepublish && cd dist && npm version $(semver $(npm show . version) --increment -i minor) && npm publish", - "publish:major": "npm run prepublish && cd dist && npm version $(semver $(npm show . version) --increment -i major) && npm publish", + "publish:patch": "npm run prepublish && cd dist && export ver=$(semver $(npm show . version) --increment -i patch) && npm version $ver && npm publish && git tag $ver", + "publish:minor": "npm run prepublish && cd dist && export ver=$(semver $(npm show . version) --increment -i minor) && npm version $ver && npm publish && git tag $ver", + "publish:major": "npm run prepublish && cd dist && export ver=$(semver $(npm show . version) --increment -i major) && npm version $ver && npm publish && git tag $ver", "prepublishOnly": "echo 'USE script \"npm run publish:patch\" (or minor/major)\n' && false", "fmt": "pretty-quick" },