ajoberstar / reckon

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

Commits counter in the insignificant stage seem to only consider the last final release #119

Closed netfalo closed 5 years ago

netfalo commented 5 years ago

According to the documentation in the insignificant stage the segment is:

a positive integer indicating the number of commits since the last significant or final release was made

But it doesn't seem to consider a significant release at all. I've create a simple gradle project demonstrating this, the project is generated with "gradle init --dsl groovy --type java-application" and only added reckon.

reckon version: 0.11.0

reckon {
    scopeFromProp()
    stageFromProp('beta', 'final')
}

git log:

>> git log --oneline
40f8fe0 (HEAD -> master) Update 3 bb8aab0 (tag: 1.1.0-beta.1) Update 2 9f721fe Update 1 c46fec9 (tag: 1.0.0) First commit

gradle build:

>> ./gradlew build > Reckoned version: 1.1.0-beta.1.3+40f8fe0

BUILD SUCCESSFUL in 1s 7 actionable tasks: 7 executed

Reckoned version: 1.1.0-beta.1.3+40f8fe0

The segment is 3(number of commits since the 1.0.0 release)

Expected version 1.1.0-beta.1.1+40f8fe0

The commits segment expected to be 1 as there was only one commit since the last significant release(1.1.0-beta.1)

Or am I missing something?

ajoberstar commented 5 years ago

Thanks for pointing this out. The doc was out of sync with the impl, so that's intended behavior.