Files
Furion/templates/generate.ps1
2022-06-18 20:00:17 +08:00

38 lines
1021 B
C#

# Furion + EFCore
$efcore_path = pwd;
$efcore_templates = Get-ChildItem -Directory $efcore_path -Exclude SqlSugarTemplates;
# Furion + SqlSugar
cd .\SqlSugarTemplates;
$sqlsugar_path = pwd;
$sqlsugar_templates = Get-ChildItem -Directory $sqlsugar_path;
cd ..;
# Nupkg
function generate($path, $templates){
$dir = $path.Path;
Write-Warning "正在生成 [$dir] Nupkg 包......";
#
for ($i = 0; $i -le $templates.Length - 1; $i++){
$item = $templates[$i];
#
$fullName = $item.FullName;
Write-Output "-----------------";
$fullName
Write-Output "-----------------";
# .nupkg
.\nuget.exe pack $fullName;
}
Write-Output "生成成功";
}
# EFCore Nupkg
generate -path $efcore_path -templates $efcore_templates
# SqlSugar Nupkg
generate -path $sqlsugar_path -templates $sqlsugar_templates