File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ Write-Host "Version Name" $VersionName
2626Write-Host " IsPreview $IsPreview "
2727Write-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+
2934Write-Output (" ##vso[task.setvariable variable=DeployToNuGet;]$DeployToNuGet " )
3035Write-Output (" ##vso[task.setvariable variable=VersionName;]$VersionName " )
3136Write-Output (" ##vso[task.setvariable variable=IsPreview;]$IsPreview " )
Original file line number Diff line number Diff 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'
You can’t perform that action at this time.
0 commit comments