I have a config Alpha and its child Bravo and Bravo's child Charlie
Alpha
------> Bravo
------------> Charlie
I run this script in a step in Charlie
def releaseCfg = configuration.getParent().getParent(); // root/Branches/Alpha/Bravo/Charlie , we want root/Branches/Alpha
nextVersion = releaseCfg.getNextVersion(true); // expected to get next version number of Alpha without setting it
logger.info("NextVersion:" + nextVersion + " for config:" + releaseCfg.getName());
The log shows "NextVersion:Alpha.0.0.4 for config:Alpha" Checks out, as expected."
However,
if I change the dryRun parameter to false and keep everything else the same,
nextVersion = releaseCfg.getNextVersion(false); // expected to get next version number of Alpha and set it
The log now shows "NextVersion:Bravo.0.0.31 for config:Alpha" AND Bravo's version number is incremented in the build Vars
Note how releaseCfg.getName() always returns Alpha as it should
Any help would be appreciated