def check_rev
  #whatever you need to do; return falsy on failure
end

before :deploy do
   raise Capistrano::Error, "invalid revision" unless check_rev 
end

On Jul 30, 2012, at 11:28 PM, habi <[email protected]> wrote:

> I searched but could not find an answer hence asking here.
> The setup is such a way that jenkins will ask the user for git tag(var name 
> TAG) and once they enter build stage will run 'cap deploy -s branch=${TAG}'.
> The setup works fine but is there any way we can add a check point to the 
> capistrano script so that it will exit before deploy if the TAG does not 
> exist?
> I know this can be done by writing a custom script but can we integrate to 
> cap?
> 
> -habi
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to