Skip to content

Commit f88dbdb

Browse files
committed
fix handling for ci package catch
1 parent d188e9d commit f88dbdb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

build/Process-Release.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Write-Host "Version Name" $VersionName
2626
Write-Host "IsPreview $IsPreview"
2727
Write-Host "Deploy to NuGet: $DeployToNuGet"
2828

29+
if($VersionName -match '-pre-.*$')
30+
{
31+
Write-Error -Message "The Package version seems to be for CI and should not be pushed to NuGet.org." -ErrorAction Stop
32+
}
33+
2934
Write-Output ("##vso[task.setvariable variable=DeployToNuGet;]$DeployToNuGet")
3035
Write-Output ("##vso[task.setvariable variable=VersionName;]$VersionName")
3136
Write-Output ("##vso[task.setvariable variable=IsPreview;]$IsPreview")

build/azure-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ stages:
144144

145145
- task: NuGetCommand@2
146146
displayName: NuGet Push
147-
enabled: $(DeployToNuGet)
148147
inputs:
149148
command: push
150149
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;$(Pipeline.Workspace)/**/*.snupkg'

0 commit comments

Comments
 (0)