Hi,

I recently made a little snippet to add support for deploying versions
of your app, based on SVN tags with a standard naming scheme:

    if variables.include?(:version)

      # set SVN URL to the specified tag
      # we assume the :repository ends in /trunk
      # ... yeah it's convention over configuration
      path_array = repository.split('/')
      path_array.pop
      # yep, we expect the tag to be named REL-some.version.number
      # again, convention over configuration
      tag_path = path_array.join('/') + '/tags/REL-' + version
      set :repository, tag_path
      # feedback
      puts "  * deploying version #{version} from #{tag_path}"
    else
      puts "\n *** WARNING: your are deploying the latest version from
/trunk"
      puts " *** to deploy a tagged version use (example): cap
deploy_version -S version=1.0\n\n\n"
    end

I dumped this straight into deploy.rb but that's a bit ugly. Ultimately
I would like to only run this bit of code with deploy and
deploy_with_migrations. I thought about using ruby's alias, but that
doesn't work with the way cap does its thing (method_missing IIRC).

Help is much appreciated!

Jeroen


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