leviy / release-tool Goto Github PK
View Code? Open in Web Editor NEWCommand line tool for releasing new versions of a project
License: MIT License
Command line tool for releasing new versions of a project
License: MIT License
Sometimes the changelog contains changes that should be left out of the changelog. For instance, pull requests merging the changes of a release branch back into master.
We should cryptographically sign the distributed release-tool.phar so people can validate it. Also, we should check the signature in the self-update
command (#44).
This allows to list releases on GitHub Releases, which supports release notes, downloads, etc.
~/.composer/auth.json
)Release notes, prereleases and release assets are out of scope for now and will be added as part of future issues.
Requires #6
Requires #4 to configure the repository name to create the release in - unless we can think of a smarter way to automatically determine this?
LICENSE.txt
file containing the license informationWhen a new version of a project is released, its changelog doesn't list changes that have been introduced earlier as part of a pre-release version.
It would be nice if the changelog of a new full version would also include the changelogs of its pre-release versions, so people don't have to look those up separately to see all that's been changed.
When I choose to release a manually chosen version (Let's say 0.0.5, so ./release-tool.phar release 0.0.5
), the tag gets properly prefixed with the configured prefix (v0.0.5
) but after pushing the tag to the repository, the releases-page (github) says the name of the release is 0.0.5
instead of the v0.0.5
as would be done when using the yes/no questions-path.
TLDR
Manually supply tag
Release > Tag is prefixed > Release name on GitHub is not prefixed.
Calculate the tag
Release > Tag is prefixed > Release name on GitHub is prefixed.
At the very least, this should allow users to configure the "release steps" that should be executed when releasing a new version.
The release tool should look for a file in the current working directory (something like .release-tool.yml
) and read the contents to apply the configuration.
Example .release-tool.yml
, with default values:
versioning-scheme: semantic
vcs:
git:
tag-prefix: v
remote: origin
post-release-actions:
github-release: ~
The configured values should be used when compiling the service container.
See https://github.com/Behat/Behat, https://github.com/sensiolabs-de/deptrac for examples.
Probably requires #7
Prereleases are releases that are not considered production-ready. The tool should support prereleases as special releases:
-beta
, -alpha
, etc. in case of semver)1.1.0-beta.1
the next (non pre-release) version should be 1.1.0
.Right now objects are instantiated in bin/release
, which does not scale well.
Find a way to use the dependency injection container in a console application.
config
directory containing services.yaml
filesCreate a release note generator that can generate release notes based on the VCS history since the previous release.
See for example https://github.com/leviy/rmt-changelog-formatter
Issue numbers in pull request titles should be converted into links, linking to the issue tracker URL for that issue.
This should support:
Perhaps the user should be able to configure a regular expression for detecting issue numbers.
Requires #4
Consider using https://github.com/humbug/phar-updater
Currently the first release can be specified manually (release-tool release 1.0.0
), but trying to automatically calculate the first version number will result in an error because there are no existing Git tags.
It should be possible to release a first version (release-tool release
), resulting in a version 1.0.0.
It should also be possible to start with a pre-release version (release-tool release --pre-release
) which should result in 1.0.0-alpha.1, 1.0.0-beta.1 or 1.0.0-rc.1 depending on interactive questions.
Major version 0 (0.y.z) is not taken into account here: users who want to start with a 0.y.z version should provide the version number manually.
version
argument for the release
command optionalversion
argument is missing, ask interactive questions based on a versioning strategyCurrently the compiled PHAR is quite big: 18.5 MB. For reference: Composer is around 1.8 MB. Removing development dependencies should reduce the size to around 2.2 MB, which is a huge improvement.
Ask for user confirmation before pushing anything to a remote repository.
Providing a phar download is required to use the Release Tool in projects that are not PHP/Composer projects or that have conflicting (Symfony) dependencies. The downloaded phar can be installed globally by placing it in a directory that is in the user's PATH, similary to Composer.
Downloading the phar should be recommended in the README over adding the release tool as a development dependency for the above reasons.
Build the phars in Travis CI and upload them (using Travis CI Deployments) to the GitHub Release (#5).
release-tool.phar
) so the latest release can be automatically downloaded by a script.PHP Fatal error: Uncaught Leviy\ReleaseTool\Vcs\GitException: fatal: not a git repository (or any of the parent directories): .git in phar:///home/nic/.local/bin/release-tool/src/Vcs/Git.php:48 Stack trace: #0 phar:///home/nic/.local/bin/release-tool/bin/release(44): Leviy\ReleaseTool\Vcs\Git::execute('git remote get-...') #1 /home/nic/.local/bin/release-tool(14): require('phar:///home/ni...') #2 {main} thrown in phar:///home/nic/.local/bin/release-tool/src/Vcs/Git.php on line 48
See https://evertpot.com/testing-composer-prefer-lowest/
This will automatically verify that our version constraints in composer.json are up-to-date. It might also allow us to configure looser version requirements, for instance for the symfony packages, so this tool can be used as a Composer dependency in older projects (that use Symfony 2/3 packages).
Discuss:
Should file paths be relative to the current working directory, or to the YAML configuration file (#4)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.