Skip to content

Commit fb2654e

Browse files
committed
Revert "removed unused code"
This reverts commit e79a71c.
1 parent e79a71c commit fb2654e

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

script/lib/update-dependency/git.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ try {
1616
module.exports = {
1717
switchToMaster: async function() {
1818
const { current } = await git.branch();
19-
if (current !== 'master') {
20-
await git.checkout('master');
19+
if (current !== 'dependency-automation') {
20+
await git.checkout('dependency-automation');
2121
}
22-
await git.pull('origin', 'master');
22+
// await git.pull('origin', 'dependency-automation');
2323
},
2424
makeBranch: async function(dependency) {
2525
const newBranch = `${dependency.moduleName}-${dependency.latest}`;

script/lib/update-dependency/util.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fs = require('fs');
22
const path = require('path');
3+
const execa = require('execa');
34
const { repositoryRootPath } = require('../../config');
45
const packageJsonFilePath = path.join(repositoryRootPath, 'package.json');
56
const packageJSON = require(packageJsonFilePath);
@@ -63,5 +64,15 @@ module.exports = {
6364
);
6465
});
6566
},
67+
runApmInstall: async function() {
68+
console.log('apm install');
69+
70+
return execa('apm', ['install'], { cwd: repositoryRootPath })
71+
.then(result => result.failed)
72+
.catch(ex => {
73+
console.log(`failed to install module`);
74+
return false;
75+
});
76+
},
6677
sleep: ms => new Promise(resolve => setTimeout(resolve, ms))
6778
};

script/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"eslint-plugin-prettier": "^3.0.1",
2525
"eslint-plugin-promise": "^4.1.1",
2626
"eslint-plugin-standard": "^4.0.0",
27+
"execa": "^4.0.2",
2728
"fs-admin": "^0.12.0",
2829
"fs-extra": "0.30.0",
2930
"glob": "7.0.3",

0 commit comments

Comments
 (0)