Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Let's assume that whenever you do a build using the development machine (named John), you want it to take place in C:\Builds\Testing. When you do a build on the production machine (named Build), it takes place on J:\Builds\Latest

1. Create an INI file with the differences

First, create a .ini file in a shared location with the parameters. Give each section the name of the machine it applies to:

 

[Build]
BuildHome=J:\Builds\Latest
[John]
BuildHome=C:\Builds\Testing

 

Name the file something like "LocalParams.ini".

2. Make your Andlt;%BUILDORPROJECT%Andgt; depend on these parameters

Define variables with the names you used in the INI file. Update all actions that use these locations to use the variables instead.

3. Load the INI file as the first step in the Andlt;%BUILDORPROJECT%Andgt;

At the start of the Andlt;%BUILDORPROJECT%Andgt;, add a "Load Variables from INI" that loads the relevant variables from the INI file. Use the %COMPUTERNAME% variable to load from the right section:

4. The finished product