Class: BricksDeploy::Generator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/bricks_deploy/generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



6
7
8
# File 'lib/bricks_deploy/generator.rb', line 6

def self.source_root
  File.expand_path('../templates', __FILE__)
end

Instance Method Details

#copy_main_hookObject



10
11
12
# File 'lib/bricks_deploy/generator.rb', line 10

def copy_main_hook
  copy_hook 'after_push.sh', 'bin/deploy/remote/after_push'
end

#copy_restart_callbacksObject



18
19
20
21
22
23
# File 'lib/bricks_deploy/generator.rb', line 18

def copy_restart_callbacks
  copy_hook 'before_restart.sh', 'bin/deploy/remote/before_restart'
  copy_hook 'after_restart.sh', 'bin/deploy/remote/after_restart'
  copy_hook 'setup.sh', 'bin/deploy/remote/setup'
  copy_hook 'rollback.sh', 'bin/deploy/remote/rollback'
end

#copy_restart_hookObject



14
15
16
# File 'lib/bricks_deploy/generator.rb', line 14

def copy_restart_hook
  copy_hook 'restart.sh', 'bin/deploy/remote/restart'
end