mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-20 10:48:15 +08:00
build: 📦 精简根目录构建文件 (#67)
This commit is contained in:
@ -45,5 +45,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B
|
||||
"""
|
||||
);
|
||||
|
||||
content = Regex.Replace(
|
||||
content,
|
||||
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"build\", \"build\", \"{8E4C93BA-9493-4892-80C4-5E174C504829}\"(?:.|\n)*?EndProject",
|
||||
$$"""
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}"
|
||||
{{'\t'}}ProjectSection(SolutionItems) = preProject
|
||||
{{string.Join('\n',
|
||||
Directory.GetFiles(@"../build", "*")
|
||||
.Select(x=>$"\t\t{Path.GetFileName(x)} = build/{Path.GetFileName(x)}")
|
||||
)}}
|
||||
{{'\t'}}EndProject
|
||||
"""
|
||||
);
|
||||
|
||||
Console.WriteLine(content);
|
||||
File.WriteAllText(slnFile, content);
|
Reference in New Issue
Block a user