Hi,
First, I want to say we are definitely in a bad state regarding semver.
We have a library which was is submodule of our global product. We never wanted to ship the library as a single component to external teams. So we tagged / branched the library repository with the version of the global product.
That's why we have such a log while running gitversion
INFO [06/04/18 12:13:34:70] Begin: Calculating base versions
INFO [06/04/18 12:13:34:73] Fallback base version: 0.1.0 with commit count source bf49308fd315ba63da4c0ee557d8d888332fbfe6 (Incremented: None)
INFO [06/04/18 12:13:34:81] Git tag 'v4.0.1': 4.0.1 with commit count source 8647a67c17b054caa58b8aa2281246a208ecfa28 (Incremented: 4.0.2)
INFO [06/04/18 12:13:34:84] Git tag 'v3.2': 3.2.0 with commit count source 81f5503ab4fc25ae3ffd174cc063b0ec2295a733 (Incremented: 3.2.1)
INFO [06/04/18 12:13:34:87] Git tag 'v3.1': 3.1.0 with commit count source 289a40aea81b3ab07a01f5631fd2a257c0108208 (Incremented: 3.0.1)
INFO [06/04/18 12:13:34:91] Git tag 'v3.0': 3.0.0 with commit count source 289a40aea81b3ab07a01f5631fd2a257c0108208 (Incremented: 3.0.1)
INFO [06/04/18 12:13:34:94] Git tag 'v2.0': 2.0.0 with commit count source e32304b92f52af200d097cccfe0b8197986e12f5 (Incremented: 2.0.1)
INFO [06/04/18 12:13:34:96] Git tag '11.0.0': 11.0.0 with commit count source e32304b92f52af200d097cccfe0b8197986e12f5 (Incremented: 11.0.1)
INFO [06/04/18 12:13:34:98] Merge message 'Merge remote-tracking branch 'origin/v11.2' into develop': 11.2.0 with commit count source 5dc711c6637d54cae35bd6eef6f17e26441f6376 (Incremented: None)
INFO [06/04/18 12:13:34:99] Found multiple base versions which will produce the same SemVer (11.2.0), taking oldest source for commit counting (Merge message 'Merge remote-tracking branch 'origin/v11.2' into develop')
INFO [06/04/18 12:13:34:99] Base version used: Merge message 'Merge remote-tracking branch 'origin/v11.2' into develop': 11.2.0 with commit count source 5dc711c6637d54cae35bd6eef6f17e26441f6376 (Incremented: None)
You can see at the end thatt we have merge commits.
Since I would not like to tag all my commits, I would like to know if there is a way to run only the TaggedCommitVersionStrategy and not use old commits to make version computations.
Our global product is now in 12.x I would not like to make my library pass to v12.x just to be upper than the computed version.
Is there a way maybe to use the more recent commit in this history to be considered as the last version to use as a base to compute next versions?
Thank you.
Found a way by ignoring the commits related to that.
Maybe would be a good idea to be able to disable commit stategies by configuration.
@Bhaal22 what was the configuration to ignore a specific commit?
I do think it would be good to have a way to turn this function off, given there is a TODO in the code to make it configurable.
here is wha I did:
Generate an empty configuration file:
gitversion init
and in the generated GitVersion.yml
branches: {}
ignore:
sha:
- 921478254e0c1c0c03d4b727089a1ad7b0a6fc9d
- ec50b5fa59cbc97ae4ce7582ffd808cfdab560a0
- 1bf3d3db32fb7217a7292b9bc53196e2eed83736
- 5dc711c6637d54cae35bd6eef6f17e26441f6376
Those SHAs are my merged commits.
@Bhaal22 Ahh very nice. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@Bhaal22 Ahh very nice. Thank you!