Skip to content

Commit 217f29e

Browse files
Merge pull request #567 from alibekissakul/master
Fix CLI function variables deploying
2 parents 89f8035 + b3d4de0 commit 217f29e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

templates/cli/lib/commands/deploy.js.twig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,19 @@ const deployFunction = async ({ functionId, all, yes } = {}) => {
276276
}
277277
}
278278

279+
// Create variables
280+
if (func.variables) {
281+
// Deploy local variables
282+
await Promise.all(Object.keys(func.variables).map(async localVariableKey => {
283+
await functionsCreateVariable({
284+
functionId: func['$id'],
285+
key: localVariableKey,
286+
value: func.variables[localVariableKey],
287+
parseOutput: false
288+
});
289+
}));
290+
}
291+
279292
// Create tag
280293
if (!func.entrypoint) {
281294
answers = await inquirer.prompt(questionsGetEntrypoint)

0 commit comments

Comments
 (0)