Revert "removed unused code"

This reverts commit e79a71c6dc.
This commit is contained in:
darangi
2020-06-26 15:48:26 +01:00
parent e79a71c6dc
commit fb2654eaac
3 changed files with 15 additions and 3 deletions

View File

@@ -16,10 +16,10 @@ try {
module.exports = {
switchToMaster: async function() {
const { current } = await git.branch();
if (current !== 'master') {
await git.checkout('master');
if (current !== 'dependency-automation') {
await git.checkout('dependency-automation');
}
await git.pull('origin', 'master');
// await git.pull('origin', 'dependency-automation');
},
makeBranch: async function(dependency) {
const newBranch = `${dependency.moduleName}-${dependency.latest}`;

View File

@@ -1,5 +1,6 @@
const fs = require('fs');
const path = require('path');
const execa = require('execa');
const { repositoryRootPath } = require('../../config');
const packageJsonFilePath = path.join(repositoryRootPath, 'package.json');
const packageJSON = require(packageJsonFilePath);
@@ -63,5 +64,15 @@ module.exports = {
);
});
},
runApmInstall: async function() {
console.log('apm install');
return execa('apm', ['install'], { cwd: repositoryRootPath })
.then(result => result.failed)
.catch(ex => {
console.log(`failed to install module`);
return false;
});
},
sleep: ms => new Promise(resolve => setTimeout(resolve, ms))
};

View File

@@ -24,6 +24,7 @@
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"execa": "^4.0.2",
"fs-admin": "^0.12.0",
"fs-extra": "0.30.0",
"glob": "7.0.3",