mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
update
Signed-off-by: Shawn Yuan (from Dev Box) <shuaiyuan@microsoft.com>
This commit is contained in:
@@ -95,13 +95,11 @@ if ($WinAppSDKVersion -match "^1\.8") {
|
|||||||
$installDir = Join-Path $rootPath "localpackages\output"
|
$installDir = Join-Path $rootPath "localpackages\output"
|
||||||
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
|
||||||
|
|
||||||
# Create a temporary nuget.config to avoid interference from the repo's config
|
$nugetConfig = Join-Path $rootPath "nuget.config"
|
||||||
$tempConfig = Join-Path $env:TEMP "nuget_$(Get-Random).config"
|
|
||||||
Set-Content -Path $tempConfig -Value "<?xml version='1.0' encoding='utf-8'?><configuration><packageSources><clear /><add key='TempSource' value='$sourceLink' /></packageSources></configuration>"
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Download package to inspect nuspec and keep it for the build
|
# Download package to inspect nuspec and keep it for the build
|
||||||
$nugetArgs = "install Microsoft.WindowsAppSDK -Version $WinAppSDKVersion -ConfigFile $tempConfig -OutputDirectory $installDir -NonInteractive -NoCache"
|
$nugetArgs = "install Microsoft.WindowsAppSDK -Version $WinAppSDKVersion -ConfigFile ""$nugetConfig"" -OutputDirectory $installDir -NonInteractive -NoCache"
|
||||||
Invoke-Expression "nuget $nugetArgs" | Out-Null
|
Invoke-Expression "nuget $nugetArgs" | Out-Null
|
||||||
|
|
||||||
# Parse dependencies from the installed folders
|
# Parse dependencies from the installed folders
|
||||||
@@ -117,8 +115,6 @@ if ($WinAppSDKVersion -match "^1\.8") {
|
|||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Warning "Failed to resolve dependencies: $_"
|
Write-Warning "Failed to resolve dependencies: $_"
|
||||||
} finally {
|
|
||||||
Remove-Item $tempConfig -Force -ErrorAction SilentlyContinue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,5 +147,10 @@ Get-ChildItem -Path $rootPath -Recurse "Directory.Packages.props" | ForEach-Obje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($installDir -and (Test-Path $installDir)) {
|
||||||
|
Write-Host "Cleaning up installed packages..."
|
||||||
|
Remove-Item -Path $installDir -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,21 +19,6 @@ steps:
|
|||||||
-useExperimentalVersion $${{ parameters.useExperimentalVersion }}
|
-useExperimentalVersion $${{ parameters.useExperimentalVersion }}
|
||||||
-rootPath "$(build.sourcesdirectory)"
|
-rootPath "$(build.sourcesdirectory)"
|
||||||
|
|
||||||
- script: echo $(WinAppSDKVersion)
|
|
||||||
displayName: 'Display WinAppSDK Version Found'
|
|
||||||
|
|
||||||
- task: NuGetAuthenticate@1
|
|
||||||
displayName: 'NuGet Authenticate'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: 'Restore NuGet packages'
|
|
||||||
inputs:
|
|
||||||
command: 'restore'
|
|
||||||
feedsToUse: 'config'
|
|
||||||
nugetConfigPath: '$(build.sourcesdirectory)\nuget.config'
|
|
||||||
restoreSolution: '$(build.sourcesdirectory)\**\*.sln'
|
|
||||||
includeNuGetOrg: false
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: 'Restore NuGet packages (slnx)'
|
displayName: 'Restore NuGet packages (slnx)'
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
Reference in New Issue
Block a user