#!/bin/sh
##############################################################################
# Name : addbranch.sh
# Purpose : Adds Branch name to field in job attached to chengelist
# For Example:
# Done for : Alvarion
# By : Ilya Rokhkin
# Date : 01-Dec-2004
# Arguments : 1 - First pending changelist
#
# Installation : 1) Copy file addbranch.sh to the D:\p4client\Perforce\scripts folder.
# 2) Run command p4 triggers
# 3) Define addbranch.sh as commit (Post submit trigger)
##############################################################################
ifjob=`p4 describe -s $1 | grep "Jobs fixed"`
if [ "$ifjob" = "Jobs fixed ..." ]
then
ifclosed=`p4 describe -s $1 | grep "*closed*" | awk '{print $6}'`
if [ "$ifclosed" = "*closed*" ]
then
job=`p4 describe -s $1 | grep "*closed*" | awk '{print $1}'`
branch=`p4 describe -s $1 | grep "... //" | awk '{print $2}' | awk -F/ '{print $4}'`
p4 job -o $job | sed "s/Label:/Label: $branch/" | p4 job -i
fi
fi
# |
Change |
User |
Description |
Committed |
|
#1
|
4719 |
Ilya Rokhkin |
Perforce commit (Post submit) trigger that adds Branch name from pending changelist to field "Label" in attached job |
|
|