From 0fe0299a499eb02b267f6eae4eed0dddd7bcbda6 Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 8 Jan 2020 16:44:05 +0800 Subject: [PATCH] chore: upload --- lib/publish/publish.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/publish/publish.js b/lib/publish/publish.js index 54687294c4..45faca17c5 100644 --- a/lib/publish/publish.js +++ b/lib/publish/publish.js @@ -2,10 +2,17 @@ const { execSync } = require("child_process"); const { resolve } = require("path"); const { writeFileSync } = require("fs"); +if (!process.env.PASSWORD) { + return; +} + 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 --registry http://192.168.5.154:4873/:_authToken=${process.env.AUTH}`); +execSync([ + `npm-cli-login -u fui -p ${process.env.PASSWORD} -e teller@fanruan.com -r http://192.168.5.154:4873/`, + "npm publish --registry http://192.168.5.154:4873/", +].join(" && "));