Sha256: e0abab1a03c080c1785af4cd898de0063f05118f6ef35597898c8f90eb909572

Contents?: true

Size: 995 Bytes

Versions: 1

Compression:

Stored size: 995 Bytes

Contents

namespace :deploy do
  def deploy_path
    File.expand_path("../../config/deploy", __dir__)
  end

  def build_env
    @build_env ||= AppBuilder::Environment.new(
      ENV.fetch("BILD_ENV", "develop"),
      File.join(deploy_path, "environment.yml"),
    )
  end

  def build_config
    @build_config ||= AppBuilder::Config.new(
      upload_type:            build_env[:upload_type],
      upload_id:              build_env[:upload_id],
      remote_app_home_base:   build_env[:remote_app_home_base],
      resource_host:          build_env[:resource_host],
      resource_user:          build_env[:resource_user],
      resource_ssh_options:   build_env[:resource_ssh_options].symbolize_keys,
      resource_document_root: build_env[:resource_document_root],
      manifest_template_path: File.join(deploy_path, "templates", "manifest.yml.erb"),
    )
  end

  desc "Upload builded source and stretcher manifest file."
  task :upload do
    AppBuilder::Uploader.upload(build_config)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
app_builder-rails-0.1.1 lib/generators/app_builder/install/templates/deploy.rake