Class: Capistrano::NetStorage::Archiver::TarGzip

Inherits:
Base
  • Object
show all
Includes:
Utils
Defined in:
lib/capistrano/net_storage/archiver/tar_gzip.rb

Overview

Archiver class for .tar.gz format

Instance Method Summary collapse

Instance Method Details

#archiveObject



14
15
16
17
18
19
20
21
# File 'lib/capistrano/net_storage/archiver/tar_gzip.rb', line 14

def archive
  c = config
  run_locally do
    within c.local_release_path do
      execute :tar, 'czf', c.local_archive_path, '.'
    end
  end
end

#checkObject



8
9
10
11
12
# File 'lib/capistrano/net_storage/archiver/tar_gzip.rb', line 8

def check
  run_locally do
    execute :which, 'tar'
  end
end

#extractObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/capistrano/net_storage/archiver/tar_gzip.rb', line 23

def extract
  c = config
  on c.servers, in: :groups, limit: c.max_parallels do
    execute :mkdir, '-p', c.archives_path
    execute :mkdir, '-p', release_path
    within release_path do
      execute :tar, 'xzf', c.archive_path
    end
  end
end