Sha256: a9c33760eebdfef99786612c815534d47b984b233bd46605a259ec54ec50fb8c

Contents?: true

Size: 850 Bytes

Versions: 24

Compression:

Stored size: 850 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  # Maintains a second checkout SVN locally, then uses sftp to push.
  # This avoids the deployment target needing to have any direct
  # access to the source code repository.
  set :scm, :subversion
  set :deploy_via, :copy
  set :copy_strategy, :export
  set :copy_cache, 'tmp/deployment'
  set :copy_dir, 'tmp/staging'

  namespace :ndr_dev_support do
    desc 'Remove the SVN cache (it may be pointing at the wrong branch)'
    task :remove_svn_cache_if_needed do
      cache = fetch(:copy_cache)
      unless Dir.exist?(cache) && `svn info #{cache}`.include?(fetch(:repository))
        logger.debug "Cache is stale for #{fetch(:branch)}, wiping..."
        system("rm -rf #{cache}")
      end
    end
  end

  before 'deploy:update_code', 'ndr_dev_support:remove_svn_cache_if_needed'
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ndr_dev_support-5.6.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.5.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.8 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.7 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.6 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.5 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.4 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.3 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.2 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.1 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.4.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.3.1 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.3.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.2.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.1.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.0.1 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-5.0.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-4.2.1 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-4.2.0 lib/ndr_dev_support/capistrano/svn_cache.rb
ndr_dev_support-4.1.3 lib/ndr_dev_support/capistrano/svn_cache.rb