📣
TiDB Cloud Premium 开放公测中。为企业级工作负载提供无限扩展、即时弹性伸缩和高级安全保障。此页面由 AI 自动翻译,英文原文请见此处。

ti update



检查或安装 TiDB Cloud CLI 的版本更新。此命令不会读取或修改 ~/.ti/ 下的设置、配置(Profile)、凭证、操作日志或其他状态数据。

语法

ti update [--check] [--dry-run] [--fail-if-update-available] [--help] [--target-version <string>] [--version]

选项

  • --check:检查是否有较新的 ti 版本可用,但不执行更新。
  • --dry-run:显示更新计划,但不修改本地二进制文件。
  • --fail-if-update-available:与 --check 一起使用时,如果有可用更新,则以退出码 1 退出。
  • --help:显示帮助信息。
  • --target-version <string>:目标 ti 版本,例如 latestvX.Y.Z[default: latest]
  • --version:显示版本信息。

有关所有命令共享的选项,请参见全局选项

示例

  • 检查是否有可用更新:

    # Compare the installed version with the latest GitHub release without changing files. ti update --check
  • 当有可用更新时使 CI 作业失败:

    # Exit with code 1 when a newer release is available, without changing files. ti update --check --fail-if-update-available
  • 预览更新:

    # Show the files and versions that an update would change. ti update --dry-run
  • 安装指定版本:

    # Replace an eligible installation with the requested release version. ti update --target-version <version>

文档内容是否有帮助?