Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-30-2006, 01:18 AM
cab cab is online now
Registered User
 
Join Date: 04-03-2006
Posts: 7
Question 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
Reply With Quote
  #2  
Old 06-01-2006, 08:13 AM
kevina kevina is online now
Registered User
 
Join Date: 03-26-2003
Posts: 825
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
Reply With Quote
  #3  
Old 06-01-2006, 05:04 PM
cab cab is online now
Registered User
 
Join Date: 04-03-2006
Posts: 7
fixed

flicked my logic upside down and it worked.
Reply With Quote
  #4  
Old 06-06-2006, 11:54 AM
Joel_W Joel_W is online now
Registered User
 
Join Date: 03-21-2006
Location: Seattle, WA
Posts: 8
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.
Reply With Quote
  #5  
Old 06-06-2006, 03:18 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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.
Reply With Quote
  #6  
Old 06-06-2006, 04:58 PM
cab cab is online now
Registered User
 
Join Date: 04-03-2006
Posts: 7
I used

"is equal to" and "is not equal to"

Tha's how I got around it.

cab
Reply With Quote
  #7  
Old 06-06-2006, 05:48 PM
Joel_W Joel_W is online now
Registered User
 
Join Date: 03-21-2006
Location: Seattle, WA
Posts: 8
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 -yUSERassword "-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.
Attached Files
File Type: bld undefined_macro_example.bld (2.2 KB, 854 views)
Reply With Quote
  #8  
Old 06-07-2006, 07:20 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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 <blank> (will build if macro value is empty)

and

is not equal to <blank> (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).
Reply With Quote
  #9  
Old 06-08-2006, 05:36 PM
Joel_W Joel_W is online now
Registered User
 
Join Date: 03-21-2006
Location: Seattle, WA
Posts: 8
That works, thanks!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:10 PM.


Copyright © 1999-2023 Kinook Software, Inc.