BuildForge Help

Special Variables for Test Projects

When you run a test build of a project using a plugin, you can use some special environment variables to run commands before and after files from your system are copied to the server.

All commands are run in the project directory:

Commands are run 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 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. If the $1 token is used in the command, it is replaced the name of the directory the command is running on. Only the first occurrence of $1 is handled this way.
_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. If the $1 token is used in the command, it is replaced the name of the file the command is running on. Only the first occurrence of $1 is handled this way.
_PRISM_DIR_POSTCMD
Specifies a command to be run on directories as they are encountered during tree traversal. is run once for every directory that contains at least one file. The command is run once for every directory in the project that contains at least one file. If the $1 token is used in the command, it is replaced the name of the directory the command is running on. Only the first occurrence of $1 is handled this way.
_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.