bonndan/release-manager
Composer 安装命令:
composer require bonndan/release-manager
包简介
Release Manager for semantic version releases of composer packages and projects.
README 文档
README
Release Manager is a PHP command line tool to help you keeping track of release versions.
- It uses your composer file to store and retrieve information.
- It enforces [semantic versions] (http://semver.org).
- Works closely together with git flow.
This is a fork of Liip's Relase Management Tool RMT. Kudos to the original authors for this tool.
Use with git-flow
./RMT release
./RMT finish
or to hotfix (patch-bump version based on master branch)
./RMT hotfix
./RMT finish
Installation
In order to use RMT your project should use Composer as RMT will be installed as a dev-dependency. Just go on your project root directory and execute:
php composer.phar require --dev bonndan/release-manager 0.5.* # lastest stable
# or
php composer.phar require --dev bonndan/release-manager dev-develop # lastest unstable
Then you must initialize RMT by running the following command:
php vendor/bonndan/release-manager/command.php init
This command will create for you a extra/rmt section in your composer.json. You
should adapt the configuration to your needs. A good example is the [composer file
of this project] (https://github.com/bonndan/release-manager/blob/master/composer.json).
From that point on you can start using it, just execute it:
./RMT
Usage with manual workflow
Using RMT is very straightforward, you just have to run the command:
./RMT release
RMT will then do the following tasks:
- Execute the prerequisites checks
- Ask the user to answers potentials questions
- Generate a new version number
- Execute the pre-release actions
- Persist the new version number
- Execute the post-release actions
Additional commands
The release command is the main behavior of the tool, but some extra commands are available:
currentwill show your project current version numberchangeswill show the last which would be part of the next releaseinitcreate a config section in your composer.json file
Configuration
All RMT configuration have to be done in the composer.json. You can optionally define a list of actions that will be executed and before or after the release of a new version
and where you want to store the version (in a changelog file, as a VCS tag, etc…). The file is divided in 5 root elements:
vcs: The type of VCS you are using, can begit,svnornoneprerequisites: A list[]of prerequisites that must be matched before starting the release processpreReleaseActions: A list[]of actions that will be executed before the release processversionPersister: The persister to use to store the versionspostReleaseActions: A list[]of actions that will be executed after the release
All the entries of this config are working the same way: You have to specify the class you want to handle the action or provide an abbrevation for classes provided by Release Manager.:
Semantic Version Generator
Release Manager only allows semantic versions without prefixes. See (Semantic versioning)[http://semver.org]. The release version can be increased by:
- major
- minor
- patch
- build number
Version persister
Class is charged of saving/retrieving the version number
- composer: uses the version from the composer file (default and recommended)
- vcs-tag: Save the version as a VCS tag
- changelog: Save the version in the changelog file
Prerequisite actions
Prerequisite actions are executed before the interactive part.
- working-copy-check: Check that you don't have any VCS local changes before release
- display-last-changes: display your last changes before release
Actions
Actions can be used for pre or post release parts.
- execute: Execute any script via system() call. Return values greather than zero cause exceptions to be thrown.
- changelog-update: Update a changelog file
- vcs-commit: Process a VCS commit
- vcs-tag: Tag the last commit
- vcs-publish: Publish the changes (commit and tags)
- composer-update: Update the version number in a composer file
Configuration examples
Most of the time, it will be easier for you to pick up and example bellow and to adapt it to your needs.
The configuration for Release Manager explained
{
"rmt": {
"vcs": "git",
"prerequisites": [
"working-copy-check",
"display-last-changes"
],
"preReleaseActions": [
{
"name": "execute",
"script": "phpunit test"
},
{
"name": "version-stamp",
"const": "RMT_VERSION"
},
{
"name": "changelog-update"
},
{
"name": "changelog-render"
}
],
"postReleaseActions": [
"vcs-commit"
]
}
}
- Git is the version control system
- Before releasing it is checked that the working copy is clean and the last changes are displayed.
- The version stamp (autogenerated php file) and the changelog are updated with the new version.
- PHPUnit (generic call) is executed and stops releasing if it fails.
- Not configured here: The composer version persister updates the composer.json file.
- After the release all changes are committed.
Pushing automatically
{
/* ... */
"postReleaseActions": [
"vcs-commit",
"vcs-publish"
],
}
No VCS, changelog updater only
{
"versionPersister": "changelog"
}
Contributing
If you would like to help, to submit one of your action script or just to report a bug: just go on the project page: https://github.com/bonndan/release-manager
Requirements
PHP 5.3 Composer
Authors
- Laurent Prodon Liip AG
- David Jeanmonod Liip AG
- Daniel Pozzi
License
RMT is licensed under the MIT License - see the LICENSE file for details
bonndan/release-manager 适用场景与选型建议
bonndan/release-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.07k 次下载、GitHub Stars 达 26, 最近一次更新时间为 2013 年 10 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「version」 「release」 「semantic versioning」 「vcs tag」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bonndan/release-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bonndan/release-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bonndan/release-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony bundle for Mutex implementation for PHP
An extension to Semantic MediaWiki allowing to build breadcrumb links from an attributive property filter
Versioning behaviour for eloquent models
Minimal CSS Framework for semantic HTML.
Adds the EDTF data type to Wikibase
Converts SemVer version (like Composer packages) into integer version with operators. Helps managing versions: store, compare, sort and retrive by conditions.
统计信息
- 总下载量: 20.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-10-06

