mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 14:43:28 +00:00
Make the the short git SHA available within the program
This commit is contained in:
@@ -58,6 +58,15 @@ pub fn build(b: *std.Build) !void {
|
||||
.optimize = mode,
|
||||
});
|
||||
try common(b, exe, options);
|
||||
{
|
||||
var opt = b.addOptions();
|
||||
opt.addOption(
|
||||
[]const u8,
|
||||
"git_commit",
|
||||
b.option([]const u8, "git_commit", "Current git commit") orelse "dev",
|
||||
);
|
||||
exe.root_module.addImport("build_info", opt.createModule());
|
||||
}
|
||||
b.installArtifact(exe);
|
||||
|
||||
// run
|
||||
|
||||
Reference in New Issue
Block a user