-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Installation Check in Pre-Release Stage (#23575)
* Adding Installation Check in Pre-Release Stage * PR modifications * Styling
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
param ( | ||
[Parameter()] | ||
[string] $ArtifactsDirectory, | ||
|
||
[Parameter()] | ||
[string] $Artifact, | ||
|
||
[Parameter()] | ||
[string] $PipelineWorkspace | ||
) | ||
|
||
Write-Host "dotnet new console" | ||
dotnet new console | ||
$localFeed = "$PipelineWorkspace/$ArtifactsDirectory-signed/$Artifact" | ||
Write-Host "dotnet nuget add source $localFeed" | ||
dotnet nuget add source $localFeed | ||
|
||
$version = (Get-ChildItem "$localFeed/*.nupkg" -Exclude "*.symbols.nupkg" -Name).replace(".nupkg","").replace("$Artifact.","") | ||
Write-Host "dotnet add package $Artifact --version $version --no-restore" | ||
dotnet add package $Artifact --version $version --no-restore | ||
if ($LASTEXITCODE) { | ||
exit $LASTEXITCODE | ||
} | ||
|
||
Write-Host "dotnet nuget locals all --clear" | ||
dotnet nuget locals all --clear | ||
|
||
Write-Host "dotnet restore -s https://api.nuget.org/v3/index.json -s $localFeed --no-cache --verbosity detailed" | ||
dotnet restore -s https://api.nuget.org/v3/index.json -s $localFeed --no-cache --verbosity detailed | ||
if ($LASTEXITCODE) { | ||
exit $LASTEXITCODE | ||
} |