Bump Calendar Versioning (CalVer) Bash Script for Git
For Toph, SemVer didn’t make much sense. CalVer did.
Toph is closed-source and available to users as a SaaS. We are not trying to maintain or communicate backwards-compatible/incompatible changes to Toph with our users. With CalVer (short for Calender Versioning), the versioning would be tied to the release date.
The pattern we wanted to use: {YYYY}.{0M}.{SEQ}.
{YYYY}: Four-digit year.{0M}: Zero-padded month.{SEQ}: Starts from 0. Goes up by 1 for each bump. Resets after the end of the month.
For example: 2022.12.3.
I needed a simple Bash script to bump Git tags with CalVer versions.
We use this for Toph and other related projects that use CalVer.
| |
Looks something like this when run:
| |
On Y, a new Git tag is created and pushed to origin. The CI/CD takes care of the rest. Perhaps a story for another day.
This post is 5th of my #100DaysToOffload challenge. Want to get involved? Find out more at 100daystooffload.com.
comments powered by Disqus