Files
kamal/lib/kamal/commands/hook.rb
David Heinemeier Hansson c4a203e648 Rename to Kamal
2023-08-22 08:24:31 -07:00

15 lines
292 B
Ruby

class Kamal::Commands::Hook < Kamal::Commands::Base
def run(hook, **details)
[ hook_file(hook), env: tags(**details).env ]
end
def hook_exists?(hook)
Pathname.new(hook_file(hook)).exist?
end
private
def hook_file(hook)
"#{config.hooks_path}/#{hook}"
end
end