When you run a test build of a project using a plug-in, you can
use some special environment variables to specify commands to run
before and after files from your system are copied to the server.
All commands are run in the project directory:
- Use PRECMD variables to run a command on directories and files
that are copied from the developer's computer to the server running
the build. The command runs before the project step. Example: You
can use this command to check out files from a source control system
before they are copied.
- Use POSTCMD variables to run a command on directories and files
after a project step has run. Example: You could use this command
to free a checked-out virtual directory (in a source control system
that uses such a concept, such as Rational ClearCase).
You run commands on directories and files marked in a Reflector
plug-in as Build Forge Project Artifacts. The commands are applied
as the directory tree for the Reflector plugin is traversed.
Note: Traversal of the directory tree is breadth-first downward
for PRECMD commands and reversed for POSTCMD commands. Commands for
directories and commands for files are run as appropriate during traversal.
- _PRISM_DIR_PRECMD
- Specifies a command to be run on directories as they are encountered
during tree traversal. The command is run once for every directory
that contains at least one file. The system replaces the first $1 in
the command with the directory name.
- _PRISM_FILE_PRECMD
- Specifies a command to be run on files as they are encountered
during tree traversal. The command is run once for every file. The
system replaces the first $1 in the command with
the file name.
- _PRISM_DIR_POSTCMD
- Specifies a command to be run on directories as they are encountered
during tree traversal. The command is run once for every directory
that contains at least one file. The system replaces the first $1 in
the command with the directory name.
- _PRISM_FILE_POSTCMD
- Specifies a command to be run on files as they are encountered
during tree traversal. The command is run once for every file. The
system replaces the first $1 in the command with
the file name.