Allow `target' recipe keyword to return target

This commit is contained in:
Thibault Jouan committed 2014-09-25 14:57:27 +00:00
1 parent eba719941d
commit b11d0b6950
3 files changed
+20 -3

No files matched your search

+2 -2
View File
@@ -26,8 +26,8 @@ module Producer
instance_eval File.read("./#{filepath}.rb"), "#{filepath}.rb"
end
def target(hostname)
env.target ||= hostname
def target(hostname = nil)
if hostname then env.target ||= hostname else env.target end
end
def task(name, *args, &block)