Adding a Script

Whether you are creating a build configuration script or a transition script, you can select any of the following three ways to add a script:

- Input script content manually

- Use a Dimensions-controlled file as a script

- Use a file in the build area as a script

You can use each of these methods whether you are creating a Pre-Script, Main Script, or Post-Script, or Clean-Up Script.

NOTE When you create a new target, you must fill out at least the name of the target before you can move to the Script page of the Create New Target Wizard.

If you are creating a transition script, you can also select Use the build configuration main script.

Entering Content Manually

You can enter the content of the script manually. This method is best when you are creating test configurations, or when the content of the build script is simple enough so that you can type it from memory.

To enter the content of the script manually:

1. From the Script page of the Create New Target wizard, select Input script content manually as a script from the drop-down list. The Script Content text field appears.

2. Enter the content of the script into the Script Content area.

NOTE Dimensions CM will look for the build script and any other files in the build directory. If you want to refer to files that are elsewhere, you will have to specify the location of those files in the script.

3. Click Next to define build options, or click Finish to complete the target definition.

Using a Dimensions-Controlled File

NOTE If you select a Dimensions-controlled file as a script, be aware that the file will be pushed to the build area if you are using a work area. If you are using a deployment area, Dimensions Build assumes that the script has already been deployed to that area.

To use a Dimensions-controlled file as a script:

1. From the Script page of the Create New Target wizard, select Use Dimensions-controlled file as a script from the drop-down list. A text field appears, with a Browse button next to it.

2. Click the Browse button. The Select File from Dimensions dialog box appears.

3. Expand the Projects or Baselines tree to display the available files.

4. Select the Dimensions-controlled file. A check mark appears next to the file name.

5. Click OK. The specification for the file appears in the text field for the script name.

6. Click Next to define build options, or click Finish to complete the target definition.

Using a File in the Build Area

To use a file in the build area as a script:

1. From the Script page of the Create New Target wizard, select Use a file in the build area as a script from the drop-down list. A text field appears.

2. If you already know the name of the file containing the build script, enter it in the text field of the dialog box; otherwise, click Browse to display the Build Area Browser.

3. Select the file from the browser, then click Select. The file appears in the Edit Transition Script dialog box.

4. Click Next to define build options, or click Finish to complete the target definition.

Using the Build Configuration Global Script

To use the build configuration global script:

1. From the Script page of the Create New Target wizard, select Same as build configuration global script from the pulldown list.

2. Click Next to define build options, or click Finish to complete the target definition.