summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-04 14:45:46 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-04 14:45:46 +0100
commitb2d056f4dddcd5b906c1bef2cdafc1e3ae38c3bf (patch)
tree77b92b14ad3784992ad8c662d0e91ddd9898b6ff /bin
parentf719cf2f758ff2fc16e2a1f048e6cede92a6cf63 (diff)
downloadgitano-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-hook14
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)