Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions build/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
const string packOutput = "nuget";
const string protosDir = "protos";
const string project = "Qdrant.Client";
const string grpcNamespace = "Qdrant.Client.Grpc";

var doc = XDocument.Load("Directory.Build.props");
var qdrantVersion = doc.Descendants(XName.Get("QdrantVersion", "http://schemas.microsoft.com/developer/msbuild/2003"))
Expand Down Expand Up @@ -107,25 +106,6 @@
}
File.WriteAllLines(file, contents);
}

// add csharp namespace to qdrant package proto files if they don't contain one
foreach (var file in Directory.EnumerateFiles(protosTagDir))
{
var contents = File.ReadAllLines(file).ToList();
if (contents.Any(line => line.Contains("option csharp_namespace")))
continue;

for (var i = 0; i < contents.Count; i++)
{
if (contents[i].StartsWith("package qdrant"))
{
contents.Insert(i + 1, $"option csharp_namespace = \"{grpcNamespace}\";");
break;
}
}

File.WriteAllLines(file, contents);
}
});

Target(Format, [Restore], () =>
Expand Down
Loading