Skip to content

release publish 版本号 side effect 无法回滚 #7

Description

@Guo-Zhang

问题描述

release publish 在预检前调用 update_config_version 修改了 Cargo.toml/pyproject.toml 的版本号。

后果:发布中途失败后,配置文件已被修改为未发布的版本号,需要手动改回。没有回滚机制。

复现步骤

  1. Cargo.toml 版本为 0.8.3
  2. 执行 release publish -v cli/v0.9.0 -y
  3. 中途失败(如 CHANGELOG 生成出错)
  4. Cargo.toml 已被改为 0.9.0,但实际并未发布

建议

  • commit 前先做全部预检,只有预检通过才执行写入操作
  • 或者用 git stash / git checkout 回滚已修改的配置文件

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions