Sha256: 134574ac06d0cd0f1d662685c460e3a0fe90e819f3ea92449c58c909dbf6cbf8

Contents?: true

Size: 895 Bytes

Versions: 4

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

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

module Avm
  module EacRedmineBase0
    class Deploy < ::Avm::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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
avm-tools-0.69.3 lib/avm/eac_redmine_base0/deploy.rb
avm-tools-0.69.2 lib/avm/eac_redmine_base0/deploy.rb
avm-tools-0.69.1 lib/avm/eac_redmine_base0/deploy.rb
avm-tools-0.69.0 lib/avm/eac_redmine_base0/deploy.rb