concourse / semver-resource

automated semantic version bumping
Apache License 2.0
97 stars 105 forks source link

Add an example of bumping pre-release version only #118

Closed mboldt closed 3 years ago

mboldt commented 4 years ago

It took me a bit to work this out. Would be nice to have it documented for the next person who comes along.

There may be a more clear or complete way to describe it (my understanding is the bump can be anything that's not major, minor, patch, or final).

mboldt commented 4 years ago

I tried to do the DCO signoff thing, but was not able to push the signoff.

taylorsilva commented 4 years ago

Hey @mboldt, the code would actually ignore bump: rc based on what I'm seeing in: https://github.com/concourse/semver-resource/blob/c9c668a92ef426a68f0e7a8ad89e161c2e3c0f76/version/bump_from_params.go#L8-L17

Which is called by both the in and out scripts: https://github.com/concourse/semver-resource/blob/c9c668a92ef426a68f0e7a8ad89e161c2e3c0f76/in/main.go#L39-L42 https://github.com/concourse/semver-resource/blob/c9c668a92ef426a68f0e7a8ad89e161c2e3c0f76/out/main.go#L60-L63

Whatever result you're getting right now with the semver-resource, you should get the same if you only set pre: rc in the params.

Are you seeing some unexpected behaviour when you don't set bump: rc in your resource's params?

mboldt commented 3 years ago

Thank you for looking into it. I tried to extract it an isolated minimal example, but it seems to work as expected. Perhaps I had something interfering in my more complicated pipeline. Sorry for the noise; appreciate the time.