有没有办法使用标准版本来更新更改日志

Is there a way to use standard-version just to update the change log

我喜欢标准版本,因为它使用 git 提交更新变更日志,但对于我正在处理的项目,版本控制由另一个命令管理 - 并且必须保持这样。有没有一种方法可以让标准版本只是为了从提交中生成新的更改日志(遵循 commitlint 标准)而不是修改版本或创建标签?

如果您希望标准版仅更新变更日志而不执行任何其他操作,那么您可以使用 CLI 或 package.json 文件中提供的跳过选项来跳过所有其他生命周期步骤。

CLI

npx standard-version --skip.bump --skip.commit --skip.tag

package.json

{
  "standard-version": {
    "skip": {
      "bump": true,
      "commit": true,
      "tag": true
    }
  }
}

如果您的其他系统只确定新标签,但不会自动为您创建它,您可以像接受的答案中那样跳过 bump,仍然可以从标准版本中获得繁重的 imperative release 像这样:

npm run release -- --release-as 1.1.0

npx standard-version -- --release-as 1.1.0