refactor: ♻️ 框架&业务代码分离 (#185)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-11-04 12:06:50 +08:00
committed by GitHub
parent 072cc1e491
commit 13ba536df2
404 changed files with 4579 additions and 1283 deletions

View File

@ -20,8 +20,10 @@ git tag -d $tag
git tag $tag
git push --tags origin release
Start-Process -FilePath "https://github.com/nsnail/NetAdmin/compare/main...release"
Write-Host "按『Enter』回到分支『Ctrl+C』退出"
Write-Host "按『Enter』回到tk分支『Ctrl+C』退出"
Pause
git checkout main
git pull
git branch -D release
git branch -D release
git branch -D tk
git checkout -b tk

View File

@ -1,6 +1,7 @@
<#@ template language="C#" #>
<#@ output encoding="utf-8" extension="resx" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<?xml version="1.0" encoding="utf-8"?>
<root>
@ -28,14 +29,11 @@
</resheader>
<#
var regex = new Regex(@"^\d", RegexOptions.Compiled);
foreach (var file in Directory.GetFiles("../assets/res/", "*.ln"))
foreach (var line in Directory.GetFiles("../assets/res/", "*.ln").SelectMany(x => File.ReadLines(x)).Distinct())
{
foreach (var line in File.ReadLines(file))
{
#>
<data name="<#= regex.IsMatch(line) ? "_" : "" #><#= line #>" xml:space="preserve"><value><#= line #></value></data>
<#
}
}
#>
</root>

View File

@ -1,15 +1,15 @@
{
"solution": "NetAdmin.sln",
"mappings": {
"Furion.Pure.NS": "../refs/Furion/framework/Furion.Pure/Furion.Pure.csproj"
"Gurion": "../refs/Gurion/src/Gurion.csproj"
},
"restore": [
{
"name": "NetAdmin.Infrastructure",
"packages": [
{
"packageName": "Furion.Pure.NS",
"version": "4.9.5.8-ns1"
"packageName": "Gurion",
"version": "1.1.0"
}
]
}

View File

@ -17,6 +17,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0
"""
);
content = Regex.Replace(
content,
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"docker\", \"docker\", \"{E80A1018-C354-4A26-9029-8847BB9DA864}\"(?:.|\n)*?EndProject",
$$"""
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{E80A1018-C354-4A26-9029-8847BB9DA864}"
ProjectSection(SolutionItems) = preProject
{{string.Join('\n',
Directory.GetFiles(@"../docker", "*")
.Select(x=>$" {Path.GetFileName(x)} = docker/{Path.GetFileName(x)}")
)}}
EndProject
"""
);
content = Regex.Replace(
content,
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"workflows\", \"workflows\", \"{3C6F049E-3EE8-4D66-9AFF-E8A369032487}\"(?:.|\n)*?EndProject",