Files
kamal/lib/kamal/commands/hook.rb
2024-03-28 20:25:24 +04:00

15 lines
296 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)
File.join(config.hooks_path, hook)
end
end