mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-16 21:21:03 +08:00
Refactor PublishToLocalSources
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
param (
|
||||
[string]$localSourcesDir = "D:/nuget.local",
|
||||
[string]$buildType = "Release"
|
||||
[string]$buildType = "Release",
|
||||
[string]$buildTimestamp
|
||||
)
|
||||
|
||||
$buildTimestamp = Get-Date -Format 'yyyyMMddHHmm'
|
||||
if ([string]::IsNullOrEmpty($buildTimestamp)) {
|
||||
$buildTimestamp = Get-Date -Format 'yyyyMMddHHmm'
|
||||
}
|
||||
|
||||
dotnet build -v diag --configuration $buildType ../packages/AtomUI/AtomUI.csproj
|
||||
dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true /p:BuildTimestamp=$buildTimestamp ../packages/AtomUI/AtomUI.csproj
|
||||
@@ -14,10 +17,10 @@ dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true /p:Buil
|
||||
$packages = Get-ChildItem -Path ../output/Nuget -Filter *.nupkg -Recurse -File
|
||||
|
||||
foreach ($pkg in $packages) {
|
||||
try {
|
||||
try {
|
||||
# 执行 NuGet 推送命令
|
||||
dotnet nuget push $pkg.FullName --source $localSourcesDir
|
||||
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "推送失败: $($pkg.Name)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user