Client side variables
Understand client variables used in Unity Version Control triggers.
Read time 1 minuteLast updated 9 months 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.
These approaches allow you to define client-side triggers across platforms.
client.conf
variables
client.confYou can define custom variables in the file in your home directory. To use the custom variable when you create a client-side trigger, you need to add a new section with the in the file. The example below defines a variable called with the value:
client.confTriggerVariablesclient.confTRIGGERS_PATHc:\triggers<?xml version="1.0"?><ClientConfigData> <Language>en</Language> <WorkingMode>UPWorkingMode</WorkingMode> <TriggerVariables> <TriggerVariable name="TRIGGERS_PATH" value="c:\triggers" /> </TriggerVariables></ClientConfigData>
You 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:
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"