【发布时间】:2021-06-21 00:14:22
【问题描述】:
我正在尝试使用以下命令一次部署多个分组的云功能
firebase deploy --only functions:groupName.functionName,functions:groupName.anotherFunctionName
但是它只是跳过了这些功能的部署。如果我像这样单独部署它们
firebase deploy --only functions:groupName.functionName 和 firebase deploy --only functions:groupName.anotherFunctionName 一个接一个地被部署。我希望能够在一个命令中完成。
是我遗漏了什么还是这个功能还没有内置?
编辑
我也尝试了以下命令,结果相同:
firebase deploy --only functions:groupName.functionName,groupName.anotherFunctionName
编辑
也许我们的函数在functions/index.ts中声明的方式有些不同:
exports.authentication = require('./authentication')
在functions/authentication.ts:
exports.createCustomToken = functions
.region('europe-west1')
.https
.onCall(async (data: any, context: any) => {/*...*/})
exports.anotherFunction= functions
.region('europe-west1')
.https
.onCall(async (data: any, context: any) => {/*...*/})
这将导致命令
firebase deploy --only functions:authentication.createCustomToken,authentication.anotherFunction
【问题讨论】:
标签: firebase google-cloud-functions firebase-cli