Class: Rays::Worker::Deployer::Maven

Inherits:
BaseWorker show all
Includes:
Singleton
Defined in:
lib/rays/workers/deployer.rb

Overview

Liferay Maven deployer

Instance Method Summary collapse

Methods inherited from BaseWorker

#execute, register

Instance Method Details

#deploy(app_module) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rays/workers/deployer.rb', line 35

def deploy(app_module)
  execute('deploy', app_module) do
    env = $rays_config.environment
    Rays::Utils::FileUtils.find_down("./", '.*\\.war$').each do |file_to_deploy|
      if env.liferay.remote?
        env.liferay.remote.copy_to(file_to_deploy, env.liferay.deploy_directory)
      else
        FileUtils.cp(file_to_deploy, env.liferay.deploy_directory)
      end
    end
  end
end