Hi Julie,

I think you're on roughly the right lines but the p4 sync command you are
forming needs to be altered a little to refer to a label. I think that you
need to prefix your label with an @ symbol for perforce to do what you
expect. e.g.

"#{local_p4} sync #{p4sync_flags} @#{release} && " +
        "tar -C #{p4client_root} -c -z -f #{temp_tar_file_local} ."

More info on the p4 command line client can be found here:
http://www.perforce.com/perforce/doc.current/manuals/cmdref/sync.html#1040665

Hope that helps,
--Richie

On 2/10/07, Julie <[EMAIL PROTECTED]> wrote:
>
>
> Hi, does anyone know how Capistrano can check out a particular tag
> (label) instead of the latest release and deploy it to other servers?
>
> Following is what I have, but I keep getting error when I execute it.
> Notice that the part after the "else" works correctly but it's only
> done when I deploy the latest release (when deploy_tag is not set) I
> am trying to get the first part to work.. Dont worry about the
> perforce details, they are correct.
>
> This section is in the local_perforce.rb file (it's a library
> component under scm directory, and it handles everything to check out
> from perforce and deploy to remote machines):
>
> if configuration[:deploy_tag]
>    set :release, ENV['TAG']
>    unless configuration[:release]
>       raise "Please specify a tag to deploy!"
>    end
> ## this part deploys a particular label
>    system(
>         "#{local_p4} sync #{p4sync_flags} #{release} && " +
>          "tar -C #{p4client_root} -c -z -f #{temp_tar_file_local} ."
>          )
> else
> ## this part deploys the latest release
>    system(
>         "#{local_p4} sync #{p4sync_flags} && " +
>         "tar -C #{p4client_root} -c -z -f #{temp_tar_file_local} ."
>          )
> end
>
> And this is in my deploy.rb file:
>
> desc "A task to deploy a specific release rather than the latest
> release from Perforce SCM"
> task :long_deploy_tag do
>   set :deploy_tag, true
>   long_deploy
> end
>
>
> This is how I want to execute the code in the command line:
>
> cap long_deploy_tag TAG=p4tag_1124
>
> thank you
> Julie
>
>
> >
>


-- 
Richie

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to