Client side variables
Understand client variables used in Unity Version Control triggers.
Read time 1 minuteLast updated 12 days ago
You can use relative or user-defined paths to customize client-side triggers. You can build the script execution paths in the following ways:
- Use customized trigger variables defined in the file.
client.conf - Use predefined variables.
client.conf
variables
You can define custom variables in the client.confclient.confTriggerVariablesclient.confTRIGGERS_PATHc:\triggersYou can use this variable to assign a path when you create a client-side trigger. You can give the path a name that you can use later with your triggers. Refer to the following example:<?xml version="1.0"?> <ClientConfigData> <Language>en</Language> <WorkingMode>UPWorkingMode</WorkingMode> <TriggerVariables> <TriggerVariable name="TRIGGERS_PATH" value="c:\triggers" /> </TriggerVariables> </ClientConfigData>
cm trigger create before-clientcheckin "client code checker" "@TRIGGERS_PATH\addformat.bat"UVCS predefined variables
There are several predefined values that you can use to compose the script field value when you create a client-side trigger:Variable | Description |
|---|---|
| This variable matches the UVCS client installation directory. |
| This variable is the current workspace path when you create the client trigger. |
| This variable points to the global configuration directory of the server you use. |
Example trigger
Create a trigger that executes a script in the global configuration directory of the server you're using:cm trigger create after-update "Delete files after update" "@GLOBAL_CONFIG_PATH/allrepos/triggers/deletefiles.bat"