I have a 'Deploy a nuget package' step in Octopus. In that step, I want to deploy a nuget package and have some deployment script executed.
Now I want the deployment to happen only for master and hotfix branches.SO I added a condition like this in the deployemnt script:
if ($BranchName.ToLower().equals("master") -or $BranchName.ToLower().contains("hotfix"))
{
...................
}
But it doesn't work and I am gettin error like this
'You cannot call a method on a null-valued expression.'
How can I achieve this?
Note: I don't have any pre-deployment and post-deployment script