Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   looses Macro setting ? (https://www.kinook.com/Forum/showthread.php?t=1789)

cab 05-30-2006 01:18 AM

looses Macro setting ?
 
Hi,

Strange thing, I've set up a Project Macro with nothing in it, then I run through some SQL and populate the Macro with a value.

One of my steps is set to only run if that Macro Value is defined. I've check both before and after it is set, before it's blank, after it has the value I want.

Problem, sometime the step just jump right over and says the macro was'nt there, any suggestions?

CAB

kevina 06-01-2006 08:13 AM

Please ZIP and send or post:
1) The info from Help | About | Install Info
2) A reproducible test case (.bld file that can be built here and reproduces the problem)
3) A build log file

cab 06-01-2006 05:04 PM

fixed
 
flicked my logic upside down and it worked.

Joel_W 06-06-2006 11:54 AM

I'm having a similar problem. I have some steps where if a macro is undefined the steps should be skipped. If the macro is defined the script should build those steps.

What happens each time is that the steps where the macro being undefined should mean the steps are skipped, the steps are built. The steps where the macro being undefined should mean the steps are built, are skipped.

I would like to know how the other person experiencing this problem resolved it. I have tried many other things. The only workaround I have found is to enter a value for the macro and use the "is equal to" and "is not equal to" logic to skip/build the desired steps.

kinook 06-06-2006 03:18 PM

Make sure you are specifying the macro like %MACRONAME% in the 'Build only if macro or expression' field. If that doesn't help, please ZIP and send or post:
1) The info from Help | About | Install Info
2) A reproducible test case (.bld file that can be built here and reproduces the problem)
3) A build log file

Thanks.

cab 06-06-2006 04:58 PM

I used
 
"is equal to" and "is not equal to"

Tha's how I got around it.

cab

Joel_W 06-06-2006 05:48 PM

1 Attachment(s)
Info from Help About:

Visual Build Professional 6.1
Registered to: Orrtax Software (3-computer license)
Windows Version: 5.1.2600.2.0
Install path: C:\Program Files\VisBuildPro6
SftTree_IX86_U_50.dll version 5.04
unins000.exe version 51.42.0.0
VisBuildCmd.exe version 6.1.0.0
VisBuildPro.exe version 6.1.0.0
VisBuildBld.dll version 6.1.0.0
VisBuildCore.dll version 6.1.0.0
VisBuildDotNET.dll version 6.1.0.0
VisBuildExt.dll version 6.1.0.0
VisBuildLog.dll version 6.1.0.0
VisBuildMisc.dll version 6.1.0.0
VisBuildMS.dll version 6.1.0.0
VisBuildMS2.dll version 6.1.0.0
VisBuildNet.dll version 6.1.0.0
VisBuildSvr.dll version 6.1.0.0
VisBuildSvr.Interop.dll version 1.0.0.0

--------------------------------------

Build Log:

6/6/2006 3:45:00 PM: --------------------Starting Build: 'C:\Documents and Settings\Joel\Desktop\Undefined_Macro_Example.bld'--------------------
6/6/2006 3:45:00 PM: Building project step 'Project steps'...
6/6/2006 3:45:00 PM: Building project step 'Branching'...
6/6/2006 3:45:00 PM: Building project step 'Branch for Milestone - MAINLINE'...
Step 'Branch for Milestone - MAINLINE' build rule evaluates false: %_FROMBRANCH% is undefined
6/6/2006 3:45:01 PM: Step skipped
6/6/2006 3:45:01 PM: Building project step 'Create Snapshot Branch'...
Step 'Branch for Milestone - MAINLINE' build rule evaluates false: %_FROMBRANCH% is undefined
6/6/2006 3:45:01 PM: Step skipped
6/6/2006 3:45:01 PM: Building project step 'Branch for Milestone - FROMBRANCH'...
6/6/2006 3:45:01 PM: Building project step 'Create Snapshot Branch'...
C:\Program Files\Seapine\Surround SCM\sscm.exe mkbranch NEW_BRANCH1.1 MAINLINE -ssnapshot -zSERVER1:4900 -yUSER:password "-ccCreated snapshot branch from "
Failed to create process: The directory name is invalid.
6/6/2006 3:45:01 PM: Step 'Create Snapshot Branch' failed
6/6/2006 3:45:01 PM: Build ended.
----------------------

The attached file will bring you the exact same results.
%FROMBRANCH% is undefined, yet it act as if it is defined.

kinook 06-07-2006 07:20 AM

In your example, a project macro named _FROMBRANCH, which is referenced by the build rules (i.e, %_FROMBRANCH%), *is* defined (to an empty value). If you want to build/skip based on whether the macro value is empty or not, use a build rule of

is equal to (will build if macro value is empty)

and

is not equal to (will build if macro value is not empty)

Also, if you have 'Tools | Application Options | General | Implement nesting of conditional build rules' checked, the build rule only needs to be defined on the parent step (and it will automatically apply to all children as well).

Joel_W 06-08-2006 05:36 PM

That works, thanks!


All times are GMT -5. The time now is 05:38 PM.


Copyright © 1999-2023 Kinook Software, Inc.