diff --git a/lib/publish/publish.js b/lib/publish/publish.js index 7506fd72b..27280672b 100644 --- a/lib/publish/publish.js +++ b/lib/publish/publish.js @@ -1,3 +1,11 @@ const { execSync } = require("child_process"); +const { resolve } = require("path"); +const { writeFileSync } = require("fs"); -execSync(`npm publish --tag 2.0.${new Date().getTime()}`); +const packageJSON = require("../../package.json"); + +packageJSON.version = `2.0.${new Date().getTime()}`; + +writeFileSync(resolve(__dirname, "../../package.json"), JSON.stringify(packageJSON, null, 2)); + +execSync("npm publish");