Hey everyone!
I just released commandbox-release, a CommandBox system module that helps you package up your CFML projects and share new versions on ForgeBox and/or GitHub.
If you’re new to this stuff, a release is a particular version of your project that’s ready for other people to download and use. Maybe you fixed a bug, added a feature, or finished your first module.
Getting that version out the door can involve a surprising amount of busywork:
- Change the version number.
- Write down what changed.
- Run your tests.
- Put the right files into a ZIP.
- Upload it and create a release on GitHub or ForgeBox.
commandbox-release handles those steps through CommandBox, so you have fewer things to remember each time.
For example, imagine your module is at version 1.0.0 and you’ve just fixed a bug. Once your project is set up, you can run:
box release publish patch
That changes the version to 1.0.1, puts your release notes under that version with today’s date, commits those changes in Git, runs your configured tests, builds and checks the ZIP, and publishes to the services you’ve chosen.
You still write the notes explaining what changed and the module organizes them for the release.
You can also use minor for a new feature (1.0.0 → 1.1.0) or major for changes that require users to adjust their code because of breaking changes (1.0.0 → 2.0.0).
To get started, install it:
box install commandbox-release
Then, from your project’s main folder, run:
box release init
Setup asks where you want to publish and whether you want to run tests. It saves your answers in a release.json file so you don’t have to answer those questions every time.
When you’re ready to try a release, add your notes under [Unreleased] in CHANGELOG.md and commit your project changes. You can do a practice run first:
box release publish patch --dryRun
That checks the project and builds the ZIP without changing the version or publishing anything.
It works with modules and web apps, and you can use individual commands to check whether a project is ready, run tests, or build a ZIP. You’ll need CommandBox and Git, plus the GitHub CLI if you want it to create GitHub Releases. I also included documentation for those who use Gitflow or GUIs like GitKraken.
Code, setup instructions, and examples on GitHub
Give it a try! I’d love to hear what’s useful, what’s confusing, and what would make releasing your projects easier.