53650e4bfe
* Fixed dependency * Updates to NeoDictionary * Changes to NeoDictionary * Started working on a Git implementation to integrate into Game Engines in the future * Added commit functionality to the git library * New changes * Added select for NeoDictionary.cs * Fixed issue with previous new method * Added a Benchmarking Tool to be used mostly in game engines * Added IndexOf to NeoDictionary.cs * Added new method for BenchmarkUtility.cs * added an instacedobject class * Added a new shuffle method for lists * fixed return type * Added new Changelog generator * Added new Game logic library to assist with game projects * Added Web Project * Added Nuget package configs * Add workflow for publishing game library NuGet package * Add README for OmegaLeo's Helper Library * Updated Website to reflect all libraries * Fixed missing library in Changelog * Added Contributing and Code of Conduct * Fixed web project * new documentation changes * fix packages * Fixed DocumentationHelper package dependencies * Added Serilog * Added logging * Fixed documentation * Added logging for cache * fixed documentation * Updated README.md * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix error --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
// See https://aka.ms/new-console-template for more information
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using GameDevLibrary.Helpers;
|
|
using OmegaLeo.HelperLib.Changelog.Models;
|
|
using OmegaLeo.HelperLib.Changelog.Tools;
|
|
|
|
var root = GetSolutionRoot();
|
|
|
|
var changelogs = new Dictionary<string, Assembly>()
|
|
{
|
|
{Path.Join(root, "OmegaLeo.HelperLib.Changelog", "CHANGELOG.md"), typeof(Changelog).Assembly},
|
|
{Path.Join(root, "OmegaLeo.HelperLib", "CHANGELOG.md"), typeof(BenchmarkUtility).Assembly},
|
|
{Path.Join(root, "OmegaLeo.HelperLib.Game", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Game.Models.ConsoleCommand).Assembly},
|
|
};
|
|
|
|
foreach (var changelog in changelogs)
|
|
{
|
|
GenerateChangelog(changelog.Key, changelog.Value);
|
|
}
|
|
|
|
|
|
void GenerateChangelog(string path, Assembly libraryAssembly)
|
|
{
|
|
var changelogMarkdown = ChangelogTool.GetMarkdown(libraryAssembly);
|
|
|
|
File.WriteAllText(path,changelogMarkdown);
|
|
}
|
|
|
|
static string GetSolutionRoot()
|
|
{
|
|
string dir = AppContext.BaseDirectory;
|
|
|
|
while (!string.IsNullOrEmpty(dir))
|
|
{
|
|
if (Directory.GetFiles(dir, "*.sln").Length > 0)
|
|
return dir; // Found the solution root
|
|
|
|
dir = Directory.GetParent(dir)?.FullName; // Move up a directory
|
|
}
|
|
|
|
throw new Exception("Solution root not found.");
|
|
} |