mtk / releaser
从开发者变更中生成 CHANGELOG.md 文件
0.1.4
2020-09-18 10:14 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0
- hassankhan/config: ^2.1
- mnapoli/silly-php-di: ^1.2
- mrrio/shellwrap: ^0.4.1
- munusphp/munus: ^0.2.2
- myclabs/php-enum: ^1.7
- phlak/semver: ^3.2
- symfony/filesystem: ^5.1
- symfony/yaml: ^5.2@dev
- webmozart/assert: ^1.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpmd/phpmd: ^2.9
- phpstan/phpstan: ^0.12.42
- phpunit/phpunit: ^9.3
- symplify/easy-coding-standard: ^8.3
README
此工具将帮助在 git 项目中进行发布和 CHANGELOG.md 维护。
此 CLI 处于测试阶段!
安装
$ composer require mtk/releaser
使用方法
创建新变更
$ vendor/bin/releaser new feature "Example change" "ID-543" "John Doe"
可用类型
- 修复
- 特性
- 弃用
- 安全
- 性能
- 其他
创建新版本
$ vendor/bin/releaser release major
可用版本
- 主要
- 次要
- 补丁
示例使用场景
Feature: Create new change by developer Background: We have git repository on GitLab, and developer with his own branch Given branch with uncommited changes When developer make new change Then new change file is created
Feature: Create new release Background: We have git repository on GitLab, with merged developer's branches to master Given master branch with unreleased changes When maintainer release new version Then changelog file is updated And new git tag is created And release is published
默认配置
changesDirectory: .unreleased changelogName: CHANGELOG.md git: enabled: true push: true commitMessage: Update changelog publishers: {}
配置 GitLab 发布者
publishers: class: GitLabPublisherClient projectId: 100 privateToken: DA32HJB2KLH321 gitlabUrl: https://gitlab.com
待办事项
- 重构 DI 容器使用的功能测试
- 修复 git 变更检查
- 添加创建变更向导
- 编写更好的文档
- 添加更多发布者,并测试自定义发布者
- 替换配置库(实际上只能替换嵌套数组默认值的一部分,例如只能替换单个 git 参数)