ajoberstar / reckon

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

reckon failing in trunk based development #188

Closed SooryakumarThoppan closed 9 months ago

SooryakumarThoppan commented 1 year ago

Below is the TBD strategy & we are trying to use reckon for artifact versioning. Facing the issue while publishing the artifact. Error is,

Scope between bases 1.0.0 and 1.2.0-beta.1 must be same or 1 MAJOR/MINOR/PATCH increment apart and are not. Cannot determine correct action.

  1. Master branch is the trunk (rc)
  2. Separate branch for release, Which is being used to tag the releases
  3. Feature branches are short lived(beta)

Steps followed:

  1. Firstly tagged the release branch as 1.0.0
  2. Master is having the same code as release branch
  3. Created feature branch from master and made some changes and commit the changes. created beta artifact and published
  4. raise PR and merge the code into master
  5. Pull the latest code from master and created a rc artifact and publised
  6. Created a PR to merge the master into Release branch.
  7. Merge the PR and pull the lastest code from release branch
  8. Created a final minor version 1.1.0 and published. Tagged the release as 1.1.0
  9. Created a new feature branch from master and made changes
  10. Tried to create a beta and publish. Thrown the error 'Scope between bases 1.0.0 and 1.2.0-beta.1 must be same or 1 MAJOR/MINOR/PATCH increment apart and are not. Cannot determine correct action'

Is it a bug? Can you please help clarifying why is it not allowing? Ideally it should allow me to create and publish the second version

ajoberstar commented 9 months ago

I believe this is because the commit you're building 1.2.0-beta.1 from does not include the 1.1.0 tag in its history.