Skip to content

Commit

Permalink
handle cases where multiple lambdas share the same source
Browse files Browse the repository at this point in the history
  • Loading branch information
Scisco committed Feb 8, 2018
1 parent 33e744c commit 1b7df10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lambda.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ class Lambda {
lambda.hash = this.getHash(lambda.source).toString();
lambda.bucket = this.bucket;

if (!this.grouped.hasOwnProperty(lambda.hash)) {
this.grouped[lambda.hash] = lambda.name;
}

// local zip
const zipFile = `${lambda.hash}-${lambda.name}.zip`;
const lambdaName = this.grouped[lambda.hash];
const zipFile = `${lambda.hash}-${lambdaName}.zip`;
lambda.local = path.join(this.buildFolder, zipFile);

// remote address
Expand Down

0 comments on commit 1b7df10

Please sign in to comment.