On Jul 29, 2011, at 02:17, Himanshu Raina wrote:

> I'm using capistrano for deploying code on my server. The post commit hook is 
> given below
> 
> #!/bin/sh
> #############################################################################################
> REPOS="$1"
> 
> DIR=`/usr/bin/svnlook changed  $REPOS | /usr/bin/head -n1 | /bin/cut -d'/' 
> -f2`
> 
> Method=`/usr/bin/svnlook changed  $REPOS | /usr/bin/head -n1 | /bin/awk 
> '{print $1}'`
> 
> /bin/echo $REPOS $DIR $Method
> #################---Addition---#####################
> if [ "$Method" == "A" ] && [ "$DIR" == "QA" ]; then
> 
> TID=`/usr/bin/svnlook changed  $REPOS | /usr/bin/head -n1 | /bin/cut -d"/" 
> -f3`
> 
> echo "Do you wish to deploy the code on QA server"
> read input

[snip]

A post-commit hook shouldn't try to be interactive.


Reply via email to