instance method
run_hook
Ruby on Rails 2.8.2
Since v1.9.3 Last seen in v2.11.0 PrivateSignature
run_hook(hook, **extra_details)
No documentation comment.
Parameters
-
hookreq -
extra_detailskeyrest
Source
# File lib/kamal/cli/base.rb, line 134
def run_hook(hook, **extra_details)
if !options[:skip_hooks] && KAMAL.hook.hook_exists?(hook)
details = {
hosts: KAMAL.hosts.join(","),
roles: KAMAL.specific_roles&.join(","),
lock: KAMAL.holding_lock?.to_s,
command: command,
subcommand: subcommand
}.compact
say "Running the #{hook} hook...", :magenta
with_env KAMAL.hook.env(**details, **extra_details) do
run_locally do
execute *KAMAL.hook.run(hook)
end
rescue SSHKit::Command::Failed => e
raise HookError.new("Hook `#{hook}` failed:\n#{e.message}")
end
end
end
Defined in lib/kamal/cli/base.rb line 134
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Kamal::Cli::Base