RandyInLA
unread,Apr 4, 2012, 10:35:10 PM4/4/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Capistrano
I have seen a few posts regarding how to use perforce labels with
Capistrano and now notice the perforce rev_no(revision) method has
been updated to include a new :p4_label variable. I have never had an
issue using perforce labels in the past without this newly
added :p4_label variable. (can't find any discussions
regarding :p4_label in this group)
@appname-x.x.x.x is our label convention. By setting the
revision=@appname-x.x.x.x on the cmd line, Capistrano has always
(well, as long as I've been using it) been able to grab the correct
version of my files.
ex: $ cap <environment> -S revision=@appname-x.x.x.x deploy
(I use the capistrano-ext rubygem to set multiple environments)
Also, by setting :release_name in my deploy.rb file, I am able to pull
the perforce label apart and use it as the release dir name, as in:
set(:release_name) { set :deploy_timestamped, true;
"#{ Time.now.utc.strftime('%Y_%m_%d_%H%M') }_#{ revision.gsub('.',
'_').gsub('@', '') }" }
It would be nice to be able to just do "$ cap <environment> @appname-
x.x.x.x deploy" and have Capistrano understand the revision... always
adding the "-S revision=" seems longer than it needs to be.
Cheers,
-=Randy