FreeSql/nuget/build-and-push.ps1
nsnail e46b474456 * TableAttribute 禁用继承
* 修改package id 避免下载到原版
* 发布到nuget.org
* xml注释文件 GenerateDocumentationFile
* 解决SqlServer唯一索引不可插入多个NULL的问题
* Microsoft.Data.SqlClient 升级至 2.1.7
* 对于已经配置了TableNameImpl的表,也支持AsTable重设表名
2024-08-26 11:41:27 +08:00

62 lines
2.1 KiB
PowerShell

# 定义参数
Param(
# Nuget APIKey
[string] $apikey
)
if ($apikey -eq $null -or $apikey -eq "")
{
Write-Error "必须指定apiKey";
return;
}
rm -r ../FreeSql.DbContext/bin/Release
dotnet build -c Release ../FreeSql.sln
$files = Get-ChildItem -Path ../FreeSql/bin/Release -Filter *-ns*.nupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../FreeSql/bin/Release -Filter *-ns*.snupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../Providers/FreeSql.Provider.Sqlite/bin/Release -Filter *-ns*.nupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../Providers/FreeSql.Provider.Sqlite/bin/Release -Filter *-ns*.snupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../Providers/FreeSql.Provider.SqlServer/bin/Release -Filter *-ns*.nupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../Providers/FreeSql.Provider.SqlServer/bin/Release -Filter *-ns*.snupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../FreeSql.DbContext/bin/Release -Filter *-ns*.nupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ../FreeSql.DbContext/bin/Release -Filter *-ns*.snupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}