feat(ide): package the VS Code extension as a VSIX
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 8s
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 6s
VoidBuildSystem CI / fuzz-clang (push) Failing after 6s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 11s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 48s

This commit is contained in:
faumaray committed 2026-12-05 13:39:57 +03:00
1 parent 3f5b21a570
commit f032c9f7fe
10 files changed
+269 -74

No files matched your search

+10
View File
@@ -3292,6 +3292,7 @@ struct IdeCmdOptions {
std::optional<std::string> compiler_arg;
std::string editor_name{"all"};
std::optional<std::string> plugin_output_arg;
std::optional<std::string> plugin_vsix_arg;
bool force{false};
};
@@ -3320,6 +3321,13 @@ int execute_ide_command(std::string_view sub, const IdeCmdOptions &opts) {
plugin_opts.editor = ide_kind;
plugin_opts.output_dir = *opts.plugin_output_arg;
plugin_opts.force = opts.force;
if (opts.plugin_vsix_arg) {
if (ide_kind != Editor::IdeKind::VsCode) {
std::cerr << "vbs ide plugin: --vsix is only supported for vscode\n";
return 2;
}
plugin_opts.vsix_path = *opts.plugin_vsix_arg;
}
if (auto exe = Platform::current_executable_path(); exe) {
plugin_opts.vbs_executable = *exe;
}
@@ -4006,6 +4014,8 @@ int main(int argc, char **argv) {
ide_plugin_cmd
.option_default("--editor", "-e", "Editor preset (vscode)", ide_opts.editor_name, "vscode")
.option("--output", "-o", "Output directory", ide_opts.plugin_output_arg)
.option("--vsix", "", "Package the VS Code extension as a .vsix (ZIP)",
ide_opts.plugin_vsix_arg)
.flag("--force", "", "Overwrite existing plugin files", ide_opts.force);
auto &ide_gen_cmd =
ide_cmd.subcommand("generate", "Generate .clangd, .vscode/, .zed/, and .idea/ IDE configs");