wikimedia / update-history
A simple tool to update HISTORY.md files
Installs: 8 789
Dependents: 13
Suggesters: 0
Security: 0
Stars: 1
Watchers: 19
Forks: 0
pkg:composer/wikimedia/update-history
Requires
- php: >=7.4.0
Requires (Dev)
- mediawiki/mediawiki-codesniffer: 48.0.0
- mediawiki/mediawiki-phan-config: 0.17.0
- mediawiki/minus-x: 1.1.3
- ockcyp/covers-validator: 1.7.0
- php-parallel-lint/php-console-highlighter: 1.0.0
- php-parallel-lint/php-parallel-lint: 1.4.0
- phpunit/phpunit: 10.5.58
README
wikimedia/update-history
A simple tool to update HISTORY.md files when making a library release.
Additional documentation about this library can be found on mediawiki.org.
Usage
To make a release:
Step 1
bin/update-history [patch|minor|major]
This increments the version number for a patch release (or, if you specify, for a minor or major release instead) and updates the HISTORY.md with the new version number and the current date.
Step 2
git add HISTORY.md git commit -m "Release <My Package> <VERSION>" git tag <VERSION>
This step will be automated in the future.
Step 3
bin/update-history
This adds a new placeholder "x.x.x (not yet released)" section to the HISTORY.md.
Step 4
git add HISTORY.md
git commit -m "Bump HISTORY.md after release"
This step will be automated in the future.
Step 5 (optional)
Push these commits to your code review system.
git review
When they are merged you may have to verify that the tag created above still corresponds to the final merged commit, and if not:
git tag -f <new git hash> <VERSION>
And finally, push the new tag:
git push origin <VERSION>
To add this tool to a new PHP project
Add this as a dependency:
composer require --dev --fixed wikimedia/update-history
It's recommended to add a shortcut to the "scripts" section of your
composer.json for the most common release action:
{
...
"scripts": {
...
"update-history": "update-history patch",
}
}
We also recommend adding a section to your README.md documenting
the use of this tool:
Releasing a new version ----------------------- This package uses `wikimedia/update-history` and its conventions. See https://www.mediawiki.org/wiki/UpdateHistory for details.