Trigger edit command reference
Find the options and arguments you can use to edit triggers from the Unity Version Control command line.
읽는 시간 2분최근 업데이트: 8일 전
The command edits a trigger on a server.
cm trigger editUsage
cm trigger | tr edit <subtype-type> <position_number> [--position=<new_position>] [--name=<new_name>] [--script=<script_path>] [--filter=<str_filter>] [--server=<repserverspec>]
cm trcm triggerOptions and arguments
The command accepts the following options and arguments:
cm trigger editOption or argument | Required | Description |
|---|---|---|
| Yes | Trigger execution and trigger operation. To see a list of trigger types, run |
| Yes | Position of the trigger to edit. |
| No | New position of the specified trigger. This position must not be in use by another trigger of the same type. |
| No | New name of the specified trigger. |
| No | New execution path of the specified trigger script. If the script starts with |
| No | Checks only items that match the specified filter. |
| No | Modifies the trigger on the specified server. If you don't specify a server, the command runs on the server that the client is configured to use. To learn more about server specifications, run |
Remarks
To make a trigger a web trigger, set to . The trigger then sends a POST request to the URI. The request body contains a JSON object with the trigger environment variables and an key that holds an array of strings.
--scriptwebtrigger <target-uri>INPUTExample commands to edit triggers
Change the name and script of the trigger of type at position 6:
after-setselectorcm trigger edit after-setselector 6 --name="Backup2 manager" --script="/new/path/to/script"
Move the trigger of type from position 7 to position 4 on the server :
before-mklabelmyserver:8084cm tr edit before-mklabel 7 --position=4 --server=myserver:8084
Change the script of the trigger of type at position 2 to a web trigger:
after-addcm trigger edit after-add 2 --script="webtrigger http://myserver.org/api"