add vscode config generation to zig build gen (#862)
* add vscode config generation to `zig build gen` * correctly handle removing configs in config_gen.zig * update log messages in config_gen.zig
This commit is contained in:
@@ -133,6 +133,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
exe.install();
|
||||
|
||||
const gen_exe = b.addExecutable("zls_gen", "src/config_gen/config_gen.zig");
|
||||
gen_exe.addPackage(.{ .name = "tres", .source = .{ .path = "src/tres/tres.zig" } });
|
||||
|
||||
const gen_cmd = gen_exe.run();
|
||||
gen_cmd.addArgs(&.{
|
||||
@@ -141,6 +142,10 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
b.fmt("{s}/README.md", .{b.build_root}),
|
||||
});
|
||||
|
||||
if (b.option([]const u8, "vscode-config-path", "Output path to vscode-config")) |path| {
|
||||
gen_cmd.addArg(b.pathFromRoot(path));
|
||||
}
|
||||
|
||||
const gen_step = b.step("gen", "Regenerate config files");
|
||||
gen_step.dependOn(&gen_cmd.step);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user