기술 자료

지원

Verify label creation

Create a trigger that verifies labels before the label is created.
읽는 시간 1분최근 업데이트: 5달 전

You can create a trigger that runs before anyone creates a new UVCS label. In the following example, if the user enters a label name that doesn't start with release, the label creation fails.

Validate that a label name starts with 'RELEASE'

if (ENV['PLASTIC_LABEL_NAME'] !~ /^release/) then exit(1) end

Trigger creation command

cm trigger create before-mklabel "check label name" "ruby c:\plastic\triggers\validate-label.rb"