Sha256: b6e19cab517cd2542e65e0dd5b9e129a52f4718e4c91c4ddd1ddba8aa032a648

Contents?: true

Size: 653 Bytes

Versions: 5

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

namespace :figaro_yml do
  include Capistrano::Ops::FigaroYml::Helpers

  task :backup do
    on release_roles :all do
      unless remote_file_exists?
        puts 'No remote application.yml to backup.'
        next
      end

      begin
        puts 'Creating backup of remote application.yml...'
        create_remote_backup
        puts 'Backup created successfully.'

        puts 'Cleaning up remote backups...'
        cleanup_remote_backups
        puts 'Remote backups cleaned up successfully.'
      rescue StandardError => e
        puts "Error during backup process: #{e.message}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
capistrano-ops-1.0.4 lib/capistrano/ops/figaro_yml/tasks/backup.rake
capistrano-ops-1.0.3 lib/capistrano/ops/figaro_yml/tasks/backup.rake
capistrano-ops-1.0.2 lib/capistrano/ops/figaro_yml/tasks/backup.rake
capistrano-ops-1.0.1 lib/capistrano/ops/figaro_yml/tasks/backup.rake
capistrano-ops-1.0.0 lib/capistrano/ops/figaro_yml/tasks/backup.rake