Skip to content

Commit

Permalink
Add new C++ header to reference gen
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Nov 15, 2024
1 parent 7c8ef91 commit 685578d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions generator/CppHeaderReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ public class CppHeaderReference
public static async Task UpdateCppReference(string outputPath)
{
outputPath = Path.GetFullPath(outputPath);
var cppHeaderUrl = "https://raw.githubusercontent.com/velopack/velopack/refs/heads/develop/src/lib-cpp/include/Velopack.h";

var cHeaderUrl = "https://raw.githubusercontent.com/velopack/velopack/refs/heads/develop/src/lib-cpp/include/Velopack.h";
var cHeader = Util.DownloadString(cHeaderUrl);
var cHeaderPath = Path.Combine(outputPath, "Velopack.h");

var cppHeaderUrl = "https://raw.githubusercontent.com/velopack/velopack/refs/heads/develop/src/lib-cpp/include/Velopack.hpp";
var cppHeader = Util.DownloadString(cppHeaderUrl);
var cppHeaderPath = Path.Combine(outputPath, "Velopack.hpp");

await File.WriteAllTextAsync(cHeaderPath, cHeader);
await File.WriteAllTextAsync(cppHeaderPath, cppHeader);

var headerPath = Path.Combine(outputPath, "Velopack.h");
await File.WriteAllTextAsync(headerPath, cppHeader);

Console.WriteLine($"Mounting {outputPath}");
await Util.StartShellProcess("docker",
[
Expand Down Expand Up @@ -59,7 +65,8 @@ await Util.StartShellProcess("docker",
Console.WriteLine(f);
}

File.Delete(headerPath);
File.Delete(cHeaderPath);
File.Delete(cppHeaderPath);
File.Delete(Path.Combine(outputPath, "standardese_files.md"));
File.Delete(Path.Combine(outputPath, "standardese_modules.md"));

Expand Down

0 comments on commit 685578d

Please sign in to comment.