|
@@ -2,6 +2,7 @@
|
2
|
2
|
const exec = require('shell-utils').exec;
|
3
|
3
|
const p = require('path');
|
4
|
4
|
const semver = require('semver');
|
|
5
|
+const fs = require('fs');
|
5
|
6
|
|
6
|
7
|
const VERSION_TAG = 'alpha';
|
7
|
8
|
const VERSION_INC = 'prerelease';
|
|
@@ -43,8 +44,11 @@ function calcNewVersion() {
|
43
|
44
|
}
|
44
|
45
|
|
45
|
46
|
function createNpmRc() {
|
46
|
|
- const npmrcPath = p.resolve(`${__dirname}/.npmrc`);
|
47
|
|
- exec.execSync(`cp -Rf ${npmrcPath} .`);
|
|
47
|
+ const content = `
|
|
48
|
+email=\${NPM_EMAIL}
|
|
49
|
+//registry.npmjs.org/:_authToken=\${NPM_TOKEN}
|
|
50
|
+`;
|
|
51
|
+ fs.writeFileSync(`.npmrc`, content);
|
48
|
52
|
}
|
49
|
53
|
|
50
|
54
|
function tagAndPublish(newVersion) {
|