-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Repo] Attempting to stabilize the API Compatibility CI job (#3766)
* Attempting to stablize the API Compatibility CI. * Tweak. * More logging. * Increase build logging level for api compat ci job. * Tweak. * Tweak. * Revert extra logging in ci job. * Switched some logging back to debug.
- Loading branch information
1 parent
7852797
commit af7ab89
Showing
2 changed files
with
20 additions
and
9 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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
param([string]$package, [string]$version) | ||
param( | ||
[string]$package, | ||
[string]$version, | ||
[string]$workDir = ".\LastMajorVersionBinaries" | ||
) | ||
|
||
$workDir = "..\LastMajorVersionBinaries" | ||
if (-Not (Test-Path $workDir)) | ||
{ | ||
Write-Host "Working directory for previous package versions not found, creating..." | ||
Write-Host "Working directory for compatibility check packages '$workDir' not found, creating..." | ||
New-Item -Path $workDir -ItemType "directory" | Out-Null | ||
} | ||
|
||
if (Test-Path -Path "$workDir\$package.$version.zip") | ||
{ | ||
Write-Debug "Previous package version already downloaded" | ||
Write-Debug "Previous package $package@$version already downloaded for compatibility check" | ||
} | ||
else | ||
{ | ||
Write-Host "Retrieving $package @$version for compatibility check" | ||
Write-Host "Retrieving package $package@$version for compatibility check" | ||
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/$package/$version -Outfile "$workDir\$package.$version.zip" | ||
} | ||
|
||
if (Test-Path -Path "$workDir\$package\$version\lib") | ||
{ | ||
Write-Debug "Previous package version already extracted" | ||
Write-Debug "Previous package $package@$version already extracted to '$workDir\$package\$version\lib'" | ||
} | ||
else | ||
{ | ||
Write-Host "Extracting package $package@$version from '$workDir\$package.$version.zip' to '$workDir\$package\$version' for compatibility check" | ||
Expand-Archive -LiteralPath "$workDir\$package.$version.zip" -DestinationPath "$workDir\$package\$version" -Force | ||
} |