changie 简单试用

changie 是基于golang 开发的,官方提供了多种安装模式(rpm/deb 包),brew 包,npm 包,以下是一个简单试用

安装

可以结合上边说的,我使用了brew

  • 安装命令
brew tap miniscruff/changie https://github.com/miniscruff/changie
brew install changie

使用

  • 初始化
changie init

效果

├── .changes
├── header.tpl.md
└── unreleased
└── .gitkeep
├── .changie.yaml
├── CHANGELOG.md
  • 默认配置

可以看到包含了changes 的目录,unreleased 目录,headerPath 以及版本格式,以及changelog 的类型信息

changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '* {{.Body}}'
kinds:
- label: Added
  auto: minor
- label: Changed
  auto: major
- label: Deprecated
  auto: minor
- label: Removed
  auto: major
- label: Fixed
  auto: patch
- label: Security
  auto: patch
newlines:
  afterChangelogHeader: 1
  beforeChangelogVersion: 1
  endOfVersion: 1
envPrefix: CHANGIE_

一个dbt-adapter 的参考示例

dbt-adapter 也是基于changie 进行changelogs 管理的,很值得参考借鉴下
可以看到包含了自己的一些change 类型,同时自定义了github 提交者信息,以及issue number 比较方便问题追踪

changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
changelogPath: CHANGELOG.md
versionExt: md
envPrefix: CHANGIE_
versionFormat: '## dbt-adapter {{.Version}} - {{.Time.Format "January 02, 2006"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '* {{.Body}}'
kinds:
  - label: Breaking Changes
  - label: Features
  - label: Fixes
  - label: Docs
  - label: Under the Hood
  - label: Dependencies
  - label: Security
newlines:
  afterChangelogHeader: 1
  afterKind: 1
  afterChangelogVersion: 1
  beforeKind: 1
  endOfVersion: 1
 
custom:
- key: Author
  label: GitHub Username(s) (separated by a single space if multiple)
  type: string
  minLength: 3
- key: Issue
  label: GitHub Issue Number (separated by a single space if multiple)
  type: string
  minLength: 1
  • 进行提交

使用dbt-adapter 的模版,参考提示信息操作就行了

  • 进行unreleased 的合并操作

支持的命令


比如我执行changie batch patch
效果

  • 进行changelog 合并

通过changie merge 就行
效果

说明

以上是一个简单试用,实际上changie 也包含了github action 可以方便集成起来,changie 是一个挺不错的changelogs 管理工具,值得尝试下

参考资料

https://changie.dev/guide/installation/
https://changie.dev/cli/changie/
https://changie.dev/config/

posted on 2024-05-27 08:00  荣锋亮  阅读(6)  评论(0编辑  收藏  举报

导航