summaryrefslogtreecommitdiff
path: root/src/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/mod.rs b/src/lua/mod.rs
index 89ff4c2..6c4a281 100644
--- a/src/lua/mod.rs
+++ b/src/lua/mod.rs
@@ -365,6 +365,8 @@ impl BuildEnv {
]
).unwrap();
build_functions.set("environment", build_environment).unwrap();
+ let current_commit = self.job.lock().unwrap().job.commit.clone();
+ build_functions.set("sha", lua_ctx.create_string(current_commit.as_bytes()).unwrap()).unwrap();
let globals = lua_ctx.globals();
globals.set("Build", build_functions).unwrap();