fix(core): update

This commit is contained in:
Philipp Kunz 2019-10-02 14:54:21 +02:00
parent aaf11b66d7
commit 487bcb9a70

View File

@ -1,6 +1,6 @@
import { logger } from '../npmci.logging'; import { logger } from '../npmci.logging';
import * as plugins from './mod.plugins'; import * as plugins from './mod.plugins';
import { bash } from '../npmci.bash'; import { bash, bashNoError } from '../npmci.bash';
import { Npmci } from '../npmci.classes.npmci'; import { Npmci } from '../npmci.classes.npmci';
export class NpmciGitManager { export class NpmciGitManager {
@ -49,11 +49,16 @@ export class NpmciGitManager {
// plugins.smartgit.GitRepo; // plugins.smartgit.GitRepo;
// remove old mirrors
await bashNoError('git remote rm mirror');
// add the mirror // add the mirror
await bash( await bash(
`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 bash(`git push mirror --all`);
await bash(`git checkout master`);
await bash(`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 bash(`git push mirror --tags`);
logger.log('ok', 'pushed all tags to mirror!'); logger.log('ok', 'pushed all tags to mirror!');