Version Bumper (replacement for expeditor built_in:bump_version) #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One of the first things Ruby (and other) developers need on a project is the SemVer version bumper, to track and tag changes when they merge to main. Expeditor provided this via the
built_in:bump_version
(usually paired with a update-version shell script). This action replicates that behavior, and combines the update-version script.Uses the VERSION file to determine current version. Then uses PR Labels to determine bump level (patch, minor, major). Uses an input to determine which files to change. Makes the changes, then commits, tags, and pushes to main.
Lots of gross logic to handle the file list, obtaining the labels, and the PR number. The actual version bumping is all handled by the gem. If the gem were less picky about file arguments, this would be simpler.
Implemented using the 'bump' rubygem. That reduces complexity - doing it in shell, which I tried, was far more complex and less reliable. But that gem is not maintained. Node's semver is a partial replacement. Solutions welcome.
Interestingly,
bump
can also do primitive CHANGELOG management.Related Issue
Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.