From d3b9a921d25412ffbafb9b9b500620aa500d55ac Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 4 Jul 2023 18:33:57 -0700 Subject: actually set Build.sha --- src/lua/mod.rs | 2 ++ 1 file changed, 2 insertions(+) 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(); -- cgit v1.1