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