This commit is contained in:
SinusCosinus
2024-07-05 20:23:50 +02:00
parent 7608b6df1f
commit 5cb90f63e1

View File

@@ -6,7 +6,7 @@ namespace rename_ue_project
{
const string UE_PROJECT_EXTENSION = ".uproject";
const string GITIGNORE = ".gitignore";
const string README = "READ.ME";
const string README = "README.md";
const string CONFIG_FOLDER = "config";
const string DEGAULT_GAME_INI = "DefaultGame.ini";
@@ -93,8 +93,10 @@ namespace rename_ue_project
private static async Task updateIgnore(string projectPath, string projectName, string oldFile)
{
var ignoreContent = await File.ReadAllTextAsync(Path.Combine(projectPath, GITIGNORE));
ignoreContent = ignoreContent.Replace(Path.GetFileName(oldFile), projectName);
var ignorePath = Path.Combine(projectPath, GITIGNORE);
var ignoreContent = await File.ReadAllTextAsync(ignorePath);
ignoreContent = ignoreContent.Replace(Path.GetFileNameWithoutExtension(oldFile), projectName);
await File.WriteAllTextAsync(ignorePath, ignoreContent);
Console.WriteLine("Replaced project name in gitignore");
}