I've set-up several plans that have dependencies on each other. I already have these dependencies in bamboo to cause rebuilds whenever something else gets rebuilt. The plans build a linux package directly usable by my deploy environments. I publish these internally to a repository.
The problem comes from the fact that I have the version deduced from git tags and distance to last tag, but each rebuild will not alter this version. While it's possible to include the current build time as an extra version component, it would be much cleaner to be able to have an incrementing counter that resets whenever a new base commit is picked. The time would just grow larger.
Is it possible to get a counter which indicates how many builds have been ran on the same commit?