Class: Seagull::DeploymentStrategies::File

Inherits:
DeploymentStrategy show all
Defined in:
lib/seagull/deployment_strategies/file.rb

Instance Method Summary collapse

Methods inherited from DeploymentStrategy

#configure, #defaults, #initialize, #release_notes

Constructor Details

This class inherits a constructor from Seagull::DeploymentStrategies::DeploymentStrategy

Instance Method Details

#deployObject


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/seagull/deployment_strategies/file.rb', line 15

def deploy
  # Make sure destionation directory exists
  unless ::File.directory?(@configuration.deploy.path)
    puts "Creating #{@configuration.deploy.path}"
    FileUtils.mkpath(@configuration.deploy.path)
  end

  # Copy xcarchive
  Dir.chdir(@configuration.archive_path) do
    deploy_path = ::File.join(@configuration.deploy.path, @configuration.archive_file_name(release_type: @configuration.active_release_type) + ".zip")
    FileUtils.rm deploy_path if ::File.exists?(deploy_path)
    puts "Creating XCArchive for deployment..."
    system("/usr/bin/zip --quiet --symlinks --recurse-paths #{Shellwords.escape(deploy_path)} #{Shellwords.escape(@configuration.archive_file_name(release_type: @configuration.active_release_type))}")
  end

  [
    @configuration.ipa_full_path(@configuration.active_release_type),
    @configuration.dsym_full_path(@configuration.active_release_type),
  ].each do |f|
    puts "Copying #{::File.basename(f)} for deployment..."
    FileUtils.cp_r f, @configuration.deploy.path
  end

  puts "Deployed to #{@configuration.deploy.path}/#{@configuration.archive_file_name(release_type: @configuration.active_release_type)}"
end

#extended_configuration_for_strategyObject


4
5
6
7
8
9
10
# File 'lib/seagull/deployment_strategies/file.rb', line 4

def extended_configuration_for_strategy
  proc do
    def generate_release_notes(&block)
      self.release_notes = block if block
    end
  end
end

#prepareObject


12
13
# File 'lib/seagull/deployment_strategies/file.rb', line 12

def prepare
end