修改发布脚本
This commit is contained in:
@@ -5,14 +5,14 @@ $scriptDir = Get-Location
|
|||||||
$output = Join-Path $scriptDir "Output"
|
$output = Join-Path $scriptDir "Output"
|
||||||
$server = "http://47.111.181.23:8081/repository/nuget-releases/"
|
$server = "http://47.111.181.23:8081/repository/nuget-releases/"
|
||||||
$key = "admin:admin"
|
$key = "admin:admin"
|
||||||
$actualDllName = "JoyD.Windows.CS.Utils.dll"
|
$actualDllName = "JoyD.Windows.CS.CubeLib.dll"
|
||||||
$targetDllName = "JoyD.Windows.CS.Utils.dll" # 保持与AssemblyName一致,避免引用问题
|
$targetDllName = "JoyD.Windows.CS.CubeLib.dll" # 保持与AssemblyName一致,避免引用问题
|
||||||
|
|
||||||
# NuGet包元数据配置 - 在此处修改所有元数据
|
# NuGet包元数据配置 - 在此处修改所有元数据
|
||||||
$packageId = "com.joyd.utils"
|
$packageId = "com.joyd.cubelib"
|
||||||
|
|
||||||
# 从AssemblyInfo.cs的AssemblyFileVersion获取版本号
|
# 从AssemblyInfo.cs的AssemblyFileVersion获取版本号
|
||||||
$assemblyInfoPath = Join-Path $scriptDir "Utils\Properties\AssemblyInfo.cs"
|
$assemblyInfoPath = Join-Path $scriptDir "CubeLib\Properties\AssemblyInfo.cs"
|
||||||
if (Test-Path $assemblyInfoPath) {
|
if (Test-Path $assemblyInfoPath) {
|
||||||
$assemblyInfoContent = Get-Content -Path $assemblyInfoPath -Encoding UTF8 -Raw
|
$assemblyInfoContent = Get-Content -Path $assemblyInfoPath -Encoding UTF8 -Raw
|
||||||
|
|
||||||
@@ -29,18 +29,18 @@ if (Test-Path $assemblyInfoPath) {
|
|||||||
Write-Host "错误: 找不到AssemblyInfo.cs文件" -ForegroundColor Red
|
Write-Host "错误: 找不到AssemblyInfo.cs文件" -ForegroundColor Red
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
$title = "通用工具库"
|
$title = "CubeLib WebSocket组件"
|
||||||
$authors = "曾庆明"
|
$authors = "曾庆明"
|
||||||
$owners = "JoyD Technology"
|
$owners = "JoyD Technology"
|
||||||
$description = "通用工具库,提供一些常用的工具函数和扩展方法"
|
$description = "CubeLib WebSocket组件,提供WebSocket客户端和服务器实现"
|
||||||
$copyright = "Copyright 2025 JoyD Technology"
|
$copyright = "Copyright 2025 JoyD Technology"
|
||||||
$tags = @("utils", "工具库")
|
$tags = @("websocket", "cubelib", "joyd")
|
||||||
$projectUrl = "https://github.com/joyd/utils"
|
$projectUrl = "https://github.com/joyd/cubelib"
|
||||||
$licenseUrl = "https://opensource.org/licenses/MIT"
|
$licenseUrl = "https://opensource.org/licenses/MIT"
|
||||||
$iconFileName = "Utils.ico"
|
$iconFileName = "CubeLib.ico"
|
||||||
$iconSourcePath = Join-Path $scriptDir $iconFileName
|
$iconSourcePath = Join-Path $scriptDir $iconFileName
|
||||||
$iconUrl = "http://47.111.181.23:8081/repository/gradle/main/Utils.ico"
|
$iconUrl = "http://47.111.181.23:8081/repository/gradle/main/CubeLib.ico"
|
||||||
$releaseNotes = "取消区域性设置,默认使用 invariant culture"
|
$releaseNotes = "WebSocket组件初始版本,支持客户端和服务器功能"
|
||||||
|
|
||||||
# 其他设置
|
# 其他设置
|
||||||
$nupkgFileName = "$packageId.$version.nupkg"
|
$nupkgFileName = "$packageId.$version.nupkg"
|
||||||
@@ -71,7 +71,7 @@ if (Test-Path "$output\$packageId.nuspec") { Remove-Item -Path "$output\$package
|
|||||||
# 构建项目
|
# 构建项目
|
||||||
Write-Host "1. 正在构建项目..."
|
Write-Host "1. 正在构建项目..."
|
||||||
Write-Host "当前目录: $scriptDir"
|
Write-Host "当前目录: $scriptDir"
|
||||||
dotnet build "$scriptDir\Utils\Utils.csproj" -c Release -o "$output"
|
dotnet build "$scriptDir\CubeLib\CubeLib.csproj" -c Release -o "$output"
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Host "错误: 构建失败!" -ForegroundColor Red
|
Write-Host "错误: 构建失败!" -ForegroundColor Red
|
||||||
|
|||||||
Reference in New Issue
Block a user