Skip to content

Commit 173f19d

Browse files
committed
only handle bugs of the provided repo
1 parent 9e1227b commit 173f19d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const debug = require('debug')('workspace-resolver');
12
const _ = require('lodash');
23
const join = require('path').join;
34
const writeJsonFile = require('write-json-file');
@@ -6,11 +7,13 @@ const resolver = {
67
postAction(source, rootDir, repoHash, deployConfigPath, tools) {
78
const config = require(deployConfigPath);
89
const resolvedApps = _.map(config.apps, (app) => {
9-
app.path = join(rootDir, app.path);
10-
app.source.path = join(rootDir, app.source.path);
11-
app.scripts = _.mapValues(app.scripts, (value, key) => {
12-
return _.map(value, (script) => script.replace('${rootDir}', rootDir));
13-
});
10+
if (tools.repoHash(app.source) === repoHash) {
11+
app.path = join(rootDir, app.path);
12+
app.source.path = join(rootDir, app.source.path);
13+
app.scripts = _.mapValues(app.scripts, (value, key) => {
14+
return _.map(value, (script) => script.replace('${rootDir}', rootDir));
15+
});
16+
}
1417
return app;
1518
});
1619
config.apps = resolvedApps;

0 commit comments

Comments
 (0)