Merged master

This commit is contained in:
github-actions[bot] 2023-11-09 11:36:13 +00:00 committed by GitHub
commit ca72957293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -67,6 +67,7 @@ string AppendNewEntry(string input, string versionNumber)
// Create the new entry with the correct indentation and next version number // Create the new entry with the correct indentation and next version number
string newEntry = indentation + $" \"MIRROR_{nextVersion}_OR_NEWER\""; string newEntry = indentation + $" \"MIRROR_{nextVersion}_OR_NEWER\"";
Console.WriteLine($"New entry: {newEntry}");
// Find the position of the "defines" HashSet and insert the new entry into it // Find the position of the "defines" HashSet and insert the new entry into it
int definesStartIndex = input.IndexOf("HashSet<string> defines = new HashSet<string>"); int definesStartIndex = input.IndexOf("HashSet<string> defines = new HashSet<string>");
@ -76,6 +77,8 @@ string AppendNewEntry(string input, string versionNumber)
input = input.Remove(definesEndIndex - 2, 2); // Remove the trailing "};" input = input.Remove(definesEndIndex - 2, 2); // Remove the trailing "};"
input = input.Insert(definesEndIndex - 2, $",\n{newEntry}\n{indentation}}};"); input = input.Insert(definesEndIndex - 2, $",\n{newEntry}\n{indentation}}};");
Console.WriteLine(input);
return input; return input;
} }

View File

@ -33,9 +33,17 @@ jobs:
dotnet tool install -g dotnet-script dotnet tool install -g dotnet-script
dotnet script --version dotnet script --version
- name: Print Current Directory Before
run: pwd
- name: Run ModPreprocessorDefine.csx - name: Run ModPreprocessorDefine.csx
run: | run: dotnet script .github/ModPreprocessorDefine.csx
dotnet script .github/ModPreprocessorDefine.csx
- name: Print Current Directory After
run: pwd
- name: Check Git Status
run: git status
- name: Commit and Push - name: Commit and Push
run: | run: |