配置与更新
有两个命令管理 CLI 自身而非某个 Gene:rotifer config 管理全局设置,rotifer self-update 负责保持版本最新。
rotifer config
Section titled “rotifer config”读写 Rotifer 的全局配置。配置按用户存储,对该机器上的所有项目生效。
rotifer config <subcommand>rotifer config list
Section titled “rotifer config list”列出当前已设置的所有配置项。
rotifer config listConfiguration───────────────update-check: truerotifer config get
Section titled “rotifer config get”读取单个配置值。
rotifer config get <key>| 参数 | 必填 | 说明 |
|---|---|---|
key | 是 | 要读取的配置键 |
rotifer config get update-checkrotifer config set
Section titled “rotifer config set”写入单个配置值。
rotifer config set <key> <value>| 参数 | 必填 | 说明 |
|---|---|---|
key | 是 | 要写入的配置键 |
value | 是 | 新的值 |
rotifer config set update-check false| 键 | 含义 |
|---|---|
update-check | CLI 是否在后台检查新版本。设为 false 可完全关闭检查——在 CI 或离线机器上很有用。 |
last-version | 更新检查最近一次见到的版本号。由 CLI 自行维护,通常无需手动设置。 |
default-publish | rotifer publish 未显式指定目标时使用的默认发布目标。 |
rotifer self-update
Section titled “rotifer self-update”检查是否有新版本,并升级到该版本。
rotifer self-update [options]选项:
| 参数 | 说明 |
|---|---|
--rollback | 回退到上一个已安装版本,而非升级。若某次升级引入了问题,用它撤回。 |
# 检查并升级rotifer self-update
# 撤销上一次升级rotifer self-update --rollback