#1
|
|||
|
|||
Conditional build rule
I'm trying to build a step with the conditional rule such as:
Build only if %VERSION% does not contain ["1.0.0" OR "2.0.0"] This works fine for a single value when I just put 1.0.0, but does this need to be scripted in order to add a check for additional values? |
#2
|
|||
|
|||
Build only if macro or expression
["%VERSION%" = "1.0.0" Or "%VERSION%" = "2.0.0"] is false |
#3
|
|||
|
|||
Thanks for quick response, but the VERSION number will be in the format of (1.0.0.x) (where x = build iteration), this example looks for exact matches.
I just need it to verify the first three places (e.g. so if VERSION does not contain at least 1.0.0 or 2.0.0, this build step will fail) |
#4
|
|||
|
|||
[Left("%VERSION%", 5) = "1.0.0" Or Left("%VERSION%", 5) = "2.0.0"]
|
#5
|
|||
|
|||
Great, that did the trick.
As usual, thanks for your help! |
|
|