[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Post Commit Hook Script !!

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Date: Fri, 29 Jul 2011 03:02:30 -0500

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.
Received on 2011-07-29 10:03:29 CEST

This is an archived mail posted to the Subversion Users mailing list.