我对Azure有点陌生。
问题是我正在开发 Azure 函数,有时我必须在本地工作(代码/测试等(,有时必须在 Azure 上工作。每次切换时,我都必须手动比较和更改应用程序设置。
有没有办法避免它?如果我在本地运行,我可以在没有手动的情况下从服务器获取最新版本,当我转到服务器时,Azure 可能会知道我的更改?
谢谢
是的
,使用 Azure Functions 核心工具 —
Usage: func azure functionapp <action> [-/--options]
fetch-app-settings Retrieve App Settings from your Azure-hosted
Function App and store locally Aliases:
fetch-app-settings, fetch
和
Usage: func azure functionapp <action> [-/--options]
publish Publish the current directory contents to an
Azure Function App. Locally deleted files
are not removed from destination.
<FunctionAppName> Function App name
--publish-local-settings [-i] Updates App Settings for the
function app in Azure during deployment.
--publish-settings-only [-o] Only publish settings and skip the
content. Default is prompt.
--overwrite-settings [-y] Only to be used in conjunction with -i or -o.
Overwrites AppSettings in Azure with local
value if different. Default is prompt.
如果你觉得有点冒险,还有本地文件的加密——
运行func settings
以获取使用情况。