@echo off :: :: This is the simplest NT command script, write checks that "Bug:" :: appears in a changelist description. :: :: It's included as an example, and is a good SMALL example that's :: used in the most recent Perforce classes on machines that might :: not have perl or a C compiler or python. :: :: Run this script with the changelist number as the only argument. :: Note that if there are multiple servers, it'll connect to a default :: and not necessarily the one that ran this script. :: :: Trigger "specification" section to run this follows: :: Triggers: :: bug_check //depot/r2.2/... "c:\Perforce\scripts\bug_check.bat %change%" :: (Of course, the full pathname will probably change!) if "%1" == "" goto error :start p4 describe %1 | findstr "Bug:" if errorlevel 1 goto error :done goto end :: :: run a non-existent command, to give a 'failing' exit code. :: :error garbagecommand 2>NULL: :end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 115 | Jeff Bowles |
updating this user-visible example to have more information on how to run it. |
||
#1 | 106 | Jeff Bowles | Branching these suckers to mimic the utils area. | ||
//guest/perforce_software/triggers/simple.cmd | |||||
#1 | 104 | Laura Wingerd |
Publish new trigger examples (change 103, change 102, change 101, change 100, change 99, change 91) |
||
//guest/jeff_bowles/perforce-triggers/simple.cmd | |||||
#2 | 100 | Jeff Bowles | Taking Fanny's comments (on the comments) into account. | ||
#1 | 99 | Jeff Bowles | Adding Jo's classroom example using an NT command file as a trigger. |