Sha256: beb6f8471a168ba9ef73d2c695ac9bd8a249faaba6c40ecd06edc67cbcaf3354

Contents?: true

Size: 997 Bytes

Versions: 17

Compression:

Stored size: 997 Bytes

Contents

# frozen_string_literal: true

require 'avm/stereotypes/eac_webapp_base0/deploy'
require 'eac_ruby_utils/ruby'

module Avm
  module Stereotypes
    module EacRedmineBase0
      class Deploy < ::Avm::Stereotypes::EacWebappBase0::Deploy
        set_callback :assert_instance_branch, :after, :run_installer

        def run_installer
          infom 'Running installer'
          ::EacRubyUtils::Ruby.on_clean_environment do
            installer_command.system!
          end
        end

        def installer_command
          instance.host_env.command(installer_path, install_task)
        end

        def installer_path
          ::File.join(instance.read_entry(:fs_path), 'plugins', 'redmine_installer', 'installer',
                      'run.sh')
        end

        def install_task
          if instance.read_entry_optional('web.path').present?
            'redmine_as_apache_path'
          else
            'redmine_as_apache_base'
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
avm-tools-0.61.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.60.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.59.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.58.1 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.58.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.57.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.56.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.55.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.54.2 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.54.1 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.54.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.53.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.52.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.51.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.50.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.49.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb
avm-tools-0.48.0 lib/avm/stereotypes/eac_redmine_base0/deploy.rb