jenkins-x-plugins/jx-release-version

Return version from latest tag when no new commits

Closed this issue · 9 comments

Where there are no new commits checked in since last release version, the returned version should be the same as the last tagged release.
Otherwise you risk releasing again on the same commit if you start a new build in the CI.

Premise: The base version is 1.2.0, and the latest release tag is v1.2.8 at git HEAD.
Running jx-release-version should return 1.2.8 and not 1.2.9.

Anyone has any thought about this?

If your latest git tag is 1.2.3 and your build automation file is 1.2.0 then jx-release-version will return 1.2.4

If the latest git commit has the git tag 1.2.3, then every time you run jx-release-version it will increment release. You could end up building multiple releases of the exact same git commit.

For instance taken from this repository could look like this:
482265f (tag: v1.0.17), (tag: v1.0.18), (tag: v1.0.19), (tag: v1.0.20), (tag: v1.0.21) Merge pull request #22 from almerico/master

It would be much better if running jx-release-version could keep giving 1.1.17 if there are no changes.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

/remove-lifecycle stale

I hope this can be done with jx-release-version.
Otherwise I need to perform my own checks prior to running jx-release-version.
We will then risk releasing the same commit for each time we run a build on it.

Though I do see that it could be a use case to know the next release version, regardless of HEAD being already tagged. Perhaps it could be implemented with an additional flag on the command line.
jx-release-version > v1.1.1
jx-release-version --force > v1.1.2

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

@jenkins-x-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.