ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
185 stars 28 forks source link

Reckon "jump" to next minor release when it shoudn't #142

Closed amiryo closed 2 years ago

amiryo commented 4 years ago

Hi, I am using version '0.12.0' of the reckon.

  1. Status of tags before the failed build: 0.1.0-ms.1 0.1.0-ms.10 0.1.0-ms.11 0.1.0-ms.12 0.1.0-ms.13 0.1.0-ms.14 0.1.0-ms.15 0.1.0-ms.16 0.1.0-ms.17 0.1.0-ms.18 0.1.0-ms.19 0.1.0-ms.2 0.1.0-ms.20 0.1.0-ms.21 0.1.0-ms.22 0.1.0-ms.23 0.1.0-ms.24 0.1.0-ms.25 0.1.0-ms.26 0.1.0-ms.27 0.1.0-ms.28 0.1.0-ms.3 0.1.0-ms.4 0.1.0-ms.5 0.1.0-ms.6 0.1.0-ms.7 0.1.0-ms.8 0.1.0-ms.9 0.1.0-rc.1 0.1.0-rc.2 0.1.0-rc.3 0.1.0-rc.4 0.2.0-ms.1

  2. Error in build: In the previous build the reckon gave the tag 0.2.0-ms.1 so, I expected to see "0.2.0-ms.2" in the current build But, I got the following error: ./mcu-version-labeler/bin/invokeGradle.sh '-Preckon.scope=minor' '-Preckon.stage=ms' printApplicableVersion FAILURE: Build failed with an exception.

    • Where: Script '/var/jenkins/workspace/sip-gateway_dev/f5070e59-ae9e-418e-bc53-f4080205c0ae/build.groovy' line: 23
    • What went wrong: A problem occurred evaluating root project 'GitSemVerGradleVersionLabeler'.

      Reckoned version 0.1.0-ms.1 has already been released.

so, I think wehave an issue here that "0.2.0-ms.1" should not accepted by reckon in the first place since, we didn't have final release "0.1.0" more then that, we do have 0.1.0-rc1...etc'

Please advice thanks Amir

  1. Only after I insert "final" tag "0.1.0" the build passed successfully with the excpected tag "0.2.0-ms.2"
ajoberstar commented 4 years ago

I'm curious about the shae of the history. Are the commits all just linear (i.e. single parent, no branching merging)?

If so, I'd agree that the 0.2.0-ms.1 seems like a big or at least in need of investigation.

amiryo commented 4 years ago

The commits tagged with "ms" are from single a branch ("dev") The commits tagged with "rc" are from single a branch ("master")

ajoberstar commented 3 years ago

Apologies for the delay. I would need to see the commit history with the tags. e.g. like a git log --oneline --graph --decorate to understand where the issue is. It will depend on the order in which the releases happened and how the commit history looked.

Generally, I would agree that the jump to 0.2.0 shouldn't have happened before the 0.1.0 release, however, it may have been a symptom of the logic to allow parallel development of versions.

ajoberstar commented 2 years ago

Closing due to lack of response. Feel free to reopen, if you want to continue discussing this.