diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-04 14:45:46 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-04 14:45:46 +0100 |
commit | b2d056f4dddcd5b906c1bef2cdafc1e3ae38c3bf (patch) | |
tree | 77b92b14ad3784992ad8c662d0e91ddd9898b6ff /bin | |
parent | f719cf2f758ff2fc16e2a1f048e6cede92a6cf63 (diff) | |
download | gitano-b2d056f4dddcd5b906c1bef2cdafc1e3ae38c3bf.tar.gz |
BIN: Move hook globals into actions from gitano-post-receive-hook
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gitano-post-receive-hook | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/bin/gitano-post-receive-hook b/bin/gitano-post-receive-hook index 60e091e..01d23d6 100644 --- a/bin/gitano-post-receive-hook +++ b/bin/gitano-post-receive-hook @@ -120,20 +120,10 @@ if not fn then gitano.log.crit(globs) elseif fn ~= true then gitano.log.info("Running project-repository post-receive hook") - for _, k in ipairs({ "table", "string", "pairs", "ipairs", "pcall", - "xpcall", "unpack", "tostring", "tonumber", "math", - "type", "coroutine", "select", "error", "assert" }) do - globs[k] = _G[k] - end - local logcopy = {} - for _, k in pairs({ "state", "crit", "critical", "err", "error", "warn", - "warning", "chat", "info", "debug", "ddebug", - "deepdebug" }) do - logcopy[k] = gitano.log[k] - end - globs["log"] = logcopy globs["_G"] = globs + gitano.actions.set_hook_globals(config, repo, globs) + local ok, msg = pcall(fn, repo, updates) if not ok then gitano.log.crit(msg) |