Вопрос

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