Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd0a7bb782 | |||
| fca00ffcf8 | |||
| 13f6334ae5 | |||
| 7275a858d6 | |||
| 5a3befe5af | |||
| 385a93a05e |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.64",
|
"version": "3.1.67",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.64",
|
"version": "3.1.67",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "node and docker in gitlab ci on steroids",
|
"description": "node and docker in gitlab ci on steroids",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -52,16 +52,19 @@ export class NpmciGitManager {
|
|||||||
// remove old mirrors
|
// remove old mirrors
|
||||||
await bashNoError('git remote rm mirror');
|
await bashNoError('git remote rm mirror');
|
||||||
|
|
||||||
|
await bash(`git fetch`);
|
||||||
// add the mirror
|
// add the mirror
|
||||||
await bash(
|
await bashNoError(
|
||||||
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
||||||
);
|
);
|
||||||
await bash(`git push mirror --all`);
|
await bashNoError(`git push mirror --all`);
|
||||||
await bash(`git checkout master`);
|
await bashNoError(`git checkout origin/master`);
|
||||||
await bash(`git push mirror master`);
|
await bashNoError(`git push mirror master`);
|
||||||
logger.log('ok', 'pushed all branches to mirror!');
|
logger.log('ok', 'pushed all branches to mirror!');
|
||||||
await bash(`git push mirror --tags`);
|
await bashNoError(`git push mirror --tags`);
|
||||||
logger.log('ok', 'pushed all tags to mirror!');
|
logger.log('ok', 'pushed all tags to mirror!');
|
||||||
|
// remove old mirrors
|
||||||
|
await bashNoError('git remote rm mirror');
|
||||||
} else {
|
} else {
|
||||||
logger.log('error', `cannot find NPMCI_GIT_GITHUBTOKEN env var!`);
|
logger.log('error', `cannot find NPMCI_GIT_GITHUBTOKEN env var!`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user