From 44d31ab160193a68366105b3b0bee83aa2d475d3 Mon Sep 17 00:00:00 2001 From: iapyang Date: Mon, 7 Sep 2020 17:40:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/postpublish/postpublish.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/postpublish/postpublish.js diff --git a/lib/postpublish/postpublish.js b/lib/postpublish/postpublish.js new file mode 100644 index 000000000..49b4ae7e6 --- /dev/null +++ b/lib/postpublish/postpublish.js @@ -0,0 +1,15 @@ +const { resolve } = require("path"); +const { execSync } = require("child_process"); +const { writeFileSync } = require("fs"); + +const packageJSON = require("../../package.json"); + +packageJSON.name = "fineui"; + +packageJSON.publishConfig.registry = 'https://registry.npmjs.org'; + +writeFileSync(resolve(__dirname, "../../package.json"), JSON.stringify(packageJSON, null, 2)); + +execSync('git add dist/'); +execSync('git add package.json'); +execSync(`git diff-index --quiet HEAD || git commit -am "auto upgrade version to ${packageJSON.version}"`);