Browse Source

Update release script [ci skip]

Shalom Yerushalmy 5 years ago
parent
commit
98cc1aebad
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      scripts/release.js

+ 3
- 1
scripts/release.js View File

@@ -127,7 +127,9 @@ function updatePackageJsonGit(version) {
127 127
     writePackageJson(packageJson);
128 128
     exec.execSync(`git add package.json`);
129 129
     exec.execSync(`git commit -m"Update package.json version to ${version} [ci skip]"`);
130
-    exec.execSync(`git push`);
130
+    const remoteUrl = new RegExp(`https?://(\\S+)`).exec(exec.execSyncRead(`git remote -v`))[1];
131
+    exec.execSyncSilent(`git remote set-url origin "https://${process.env.GIT_USER}:${process.env.GIT_TOKEN}@${remoteUrl}"`);
132
+    exec.execSync(`git push origin master`);
131 133
 }
132 134
 
133 135
 run();