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


--~--~---------~--~----~------------~-------~--~----~
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