Variable based on branch name

Hi guys,

I’d like to create a general checkin trigger for our release builds. The trigger should cover all branches that matches “release/*”. As the version number for the release is included in the branch name (e.g. release/9.4.1) I’d like to read the version number from the branch name and assign it to our version number variables VersionMajor, VersionMinor and VersionRelease. Is that in possible?

Regards

Kay Zumbusch

Hi Kay,

You can get the branch name using $Source.RepoName.Branch$, however there are no string manipulation functions in Continua. You would need to use FinalBuilder (Set Variable or Set Version actions) or another external program to set the variable or version using custom log messages

You should also look into using GitVersion which will set the Continua build version number if you use the option /output buildserver.