I'm trying to copy deployment batch files depending on the build configuration (e.g. Dev, QA, preprod, etc). I was using a switch statement, but that meant having to copy the same logic (sequence) for each case switch. Is there a way to put the condition statement in my FindMatchingFiles activity? Perhaps in the MatchPattern argument?

有帮助吗?

解决方案 2

The solution was to have my deployment batch files include the name of the configuration they apply to.

String.Format("{0}\_DeploymentScripts\{1}*.bat", SourcesDirectory, platform.Configuration)

其他提示

There is no way to put logic in that activity. You need to wrap the logic around it. It is possible that you could simply have a switch statement that wraps the logic for building up the string for the match pattern and then use that value in the sequence that does the work. That way you wouldn't need to repeat the sequence.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top