Skip to content

Conversation

clintoncwolfe
Copy link

@clintoncwolfe clintoncwolfe commented May 16, 2025

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant