Kinook Software Forums

Kinook Software Forums (
-   [VBP] General Discussion (
-   -   Conditional build rule (

paxil 10-12-2017 01:51 PM

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?

kinook 10-12-2017 02:31 PM

Build only if macro or expression

["%VERSION%" = "1.0.0" Or "%VERSION%" = "2.0.0"]

is false

paxil 10-12-2017 03:24 PM

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)

kinook 10-12-2017 03:33 PM

[Left("%VERSION%", 5) = "1.0.0" Or Left("%VERSION%", 5) = "2.0.0"]

paxil 10-12-2017 04:03 PM

Great, that did the trick.

As usual, thanks for your help!

All times are GMT -5. The time now is 08:00 PM.

Copyright 1999-2021 Kinook Software, Inc.