首页指南参考教程

推出

将新分支上的更新增量部署到通道。


适用于 SDK 50 及更高版本 (expo-updates >= 0.23.0)。

推出将新分支上的更新增量部署到特定通道。通过推出,你可以将更新从一个分支推出到一定比例的终端用户,并将剩余百分比的用户保留在当前分支上。在测试新功能时,这非常有用,可以最大限度地降低在生产环境中引入错误或其他问题的风险。

¥Rollouts incrementally deploy updates on a new branch to a specific channel. With rollouts, you can roll out updates from one branch to a percentage of end users and leave the remaining percentage of users on the current branch. This is useful when testing a new feature to minimize the risk of introducing bugs or other issues to our production environment.

开始部署

¥Start a rollout

要开始推出,请确保你安装了 EAS CLI 版本 4.0.0 或更高版本。然后,运行以下命令:

¥To start a rollout, ensure you have EAS CLI version 4.0.0 or above installed. Then, run the following command:

Terminal
eas channel:rollout

在终端中,交互式指南将帮助你选择通道、选择要推出的分支以及设置要推出的用户百分比。要增加或减少转出量,请再次运行该命令并选择 Edit 选项来调整转出百分比。

¥In the terminal, an interactive guide will assist you in selecting a channel, choosing a branch for the rollout, and setting the percentage of users for the rollout. To increase or decrease the rollout amount, run the command again and choose the Edit option to adjust the rollout percentage.

结束推出

¥End a rollout

当你在交互式指南中选择 End 选项时,有两种方法可以结束推出:

¥Two methods are available to end a rollout when you choose the End option in the interactive guide:

  • 重新发布并恢复:一旦你对新分支提供的更新充满信心,就可以使用此选项。这将在旧分支上再次发布更新,并且用户将恢复到旧分支。

    ¥Republish and revert: This option can be used once you are confident with the update served from the new branch. This will publish the update again on the old branch and users will be reverted back to it.

  • 恢复:选择忽略新分支上的更新并将用户返回到旧分支。

    ¥Revert: Choose to disregard the updates on the new branch and return users to the old branch.

使用推出

¥Work with rollouts

  • 一个通道上一次只能推出一个分支。

    ¥Only one branch can be rolled out on a channel at a single time.

  • 要查看推出的状态,请使用 eas channel:rollout 命令。网站支持即将推出。

    ¥To see the state of the rollout, use the eas channel:rollout command. Website support is coming soon.

  • 例如,当部署正在进行时,你可以通过运行 eas update --branch [branch] 将更新发布到已部署分支和当前分支。

    ¥When a rollout is in progress, you can publish updates to both rolled out and current branches by running eas update --branch [branch], for example.

  • 当部署正在进行时,无法使用 eas update --channel [channel],因为它无法知道将更新与哪个分支关联。

    ¥eas update --channel [channel] cannot be used when a rollout is in progress since it cannot know which branch to associate the update with.

Expo 中文网 - 粤ICP备13048890号