We currently use feature branching for some of our applications and push multiple branches/applications to our various environments. A custom powershell script is currently used to parse the pre-release “branch/tag” name from the version. I was wondering if there is a built in OctopusDeploy system variable for the “pre-release tag” that could be used instead?
Thanks for getting in touch! I’m sorry to say there isn’t a built-in variable for the pre-release tag portion of the version. Thankfully the SemVer specification we follow means you should be able to reliably split the version at the first - character you encounter. If you iterate to use metadata in your version, you may want to further split on the + character.
Have you found this form of string manipulation to be unreliable in your situation?
Thanks Michael - I currently have a regex to do exactly that. I’ve noticed you all have been adding more and more system variables so have been able to remove some custom scripts and was hoping it just wasn’t documented yet. I’ve been trying to paramter-ize and pull out all the custom scripts from our projects - so if possible, it would be nice to have as a built-in system variable.