Question

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?

Était-ce utile?

La solution 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)

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top