Easing semver constraint on releasing modules from Bamboo

Hi all,

We have one community module - reportingcompatibility - for which we had to add a 4th level of versioning in order to handle a maintenance branch cut off of master.

The branch was cut off of the 1.5.13 release and into a branch called 1.5.13.x.

I’d like to release non-snapshot version from here (eg. 1.5.13.1), but the release-scripts in Bamboo do not allow for it. See here: https://github.com/openmrs/openmrs-contrib-bamboo/blob/master/release-prepare-perform.sh#L41

Thoughts on whether we can add an option for this script to take an argument that indicates that the semver checks should be skipped (or that a.b.c.d should be allowed generally)?

@dkayiwa / @cintiadr FYI and thanks.

Mike

I’d suggest that 1.5.13-1 is at least a syntactically valid SemVer. Of course, the script would still fail on that, but we could updated it to use the SemVer recommended regex:

^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
1 Like

Am in full support of the proposal. :slight_smile:

1 Like

I don’t have any strong opinion (but I won’t have time to do it this week!), but modify it any way that is needed :slight_smile:

@mseaton why not release a 1.6.x (as the main version now), then keep the 1.5.x releases as the ones for the maintenance branch that way you do not need a 4th level of Semvar

1 Like

@ssmusoke, it’s a good idea. That was my first instinct too, but I thought it wasn’t doable as there were other branches that had progressed on that version line. But now that I look at it again, I think I can likely make that work. That would definitely make things easier and clearer. Let me see if I can do that first.

Thanks to everyone who replied with their feedback - very insightful!

OK, after some trial and error (sorry for all of the build failure messages to those that subscribe), that seems to have worked. See ticket I created below to summarize:

1 Like

I create a PR here to expand our semver support. It still won’t like four levels, but it’s better than hacking in individual strings as we need them :slightly_smiling_face:.

1 Like