Skip to content

Commit 161fd1c

Browse files
committed
fix(cli): Bug when deploying multiple functions at once
1 parent 0f54756 commit 161fd1c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/cli/base/params.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@
2626

2727
const files = getAllFiles({{ parameter.name | caseCamel | escapeKeyword }}).map((file) => pathLib.relative({{ parameter.name | caseCamel | escapeKeyword }}, file)).filter((file) => !ignorer.ignores(file));
2828

29+
const archiveFileName = `${functionId}-code.tar.gz`;
30+
2931
await tar
3032
.create({
3133
gzip: true,
3234
sync: true,
3335
cwd: folderPath,
34-
file: 'code.tar.gz'
36+
file: archiveFileName
3537
}, files);
3638

37-
let archivePath = fs.realpathSync('code.tar.gz')
39+
let archivePath = fs.realpathSync(archiveFileName)
3840
if (typeof archivePath !== 'undefined') {
3941
payload['{{ parameter.name }}'] = archivePath;
4042
{{ parameter.name | caseCamel | escapeKeyword }} = archivePath;

0 commit comments

Comments
 (0)