I have been using git flow for a couple of months and it has worked very well. I would like to automate the "bump version" operation.
The project is PHP and the footer.php has a token to replace with the current release tag. I am certain that with some awk'ing of git log and the PHP file everything should work out, but I assume someone has done this before...
Any ideas?
Step 1: Bump Version on Merge Here's a GitHub action to automatically get your most recent version, bump the patch number, tag it, and push the tag: Just throw that in . github/workflows/bump. yml and you're done!
Bump version stands for: It means to increment the version number to a new, unique value.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. On the other hand, Git Flow is detailed as "A set of git extensions to provide high-level repository operations".
You could use the semver gem, which adds a file .semver
to the root of your git repo. Semantic version numbers are a recommendation for having structured/consistent/meaningful version numbers, the gem just makes it easy to implement.
So, all you'd need to do is add:
semver inc major|minor|patch
into your workflow (manually or scripted) so that the .semver gets updated during a release.
If you don't want the ruby dependency, semver is pretty simple, so a bit of sed experimentation will likely yield a working solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With