提交 6c55c5a3 编写于 作者: J Jared Parsons

Remove other references to Ensure-NuGet

上级 f763de67
......@@ -365,8 +365,8 @@ function Get-VisualStudioDir() {
# Clear out the NuGet package cache
function Clear-PackageCache() {
$nuget = Ensure-NuGet
Exec-Block { & $nuget locals all -clear } | Out-Host
$dotnet = Ensure-DotnetSdk
Exec-Console $dotnet "nuget locals all -clear"
}
# Restore a single project
......
......@@ -86,10 +86,7 @@ function Run-GetText() {
# Build all of the tools that we need to generate the syntax trees and ensure
# they are in a published / runnable state.
function Build-Tools() {
$msbuild = Ensure-MSBuild
$msbuildDir = Split-Path -parent $msbuild
$nuget = Ensure-NuGet
$dotnet = Ensure-DotnetSdk
$list = @(
'boundTreeGenerator;BoundTreeGenerator;BoundTreeGenerator\CompilersBoundTreeGenerator.csproj',
'csharpErrorFactsGenerator;CSharpErrorFactsGenerator;CSharpErrorFactsGenerator\CSharpErrorFactsGenerator.csproj',
......@@ -106,8 +103,8 @@ function Build-Tools() {
$proj = $all[2]
$fileName = [IO.Path]::GetFileNameWithoutExtension($proj)
Write-Host "Building $fileName"
Restore-Project $proj -nuget $nuget -msbuildDir $msbuildDir
Exec-Command $msbuild "/t:Publish /p:Configuration=Debug /p:RuntimeIdentifier=win-x64 /v:m $proj" | Out-Null
Restore-Project $dotnet $proj
Exec-Command $dotnet "publish /p:Configuration=Debug /p:RuntimeIdentifier=win-x64 /v:m $proj" | Out-Null
$exePath = Join-Path $binariesDir "Debug\Exes\$fileName\win-x64\publish\$($exeName).exe"
if (-not (Test-Path $exePath)) {
......
......@@ -26,7 +26,7 @@ function Run-Build([string]$rootDir, [switch]$restore = $false, [string]$logFile
if ($restore) {
Write-Host "Restoring the packages"
Restore-Project -fileName "Roslyn.sln" -nuget (Ensure-NuGet) -msbuildDir (Split-Path -parent $msbuild)
Restore-Project $dotnet "Roslyn.sln"
}
$args = "/nologo /v:m /nodeReuse:false /m /p:DebugDeterminism=true /p:BootstrapBuildPath=$script:bootstrapDir /p:Features=`"debug-determinism`" /p:UseRoslynAnalyzers=false Roslyn.sln"
......@@ -197,6 +197,7 @@ function Run-Test() {
try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
$dotnet = Ensure-DotnetSdk
$msbuild = Ensure-MSBuild
if (($bootstrapDir -eq "") -or (-not ([IO.Path]::IsPathRooted($script:bootstrapDir)))) {
Write-Host "The bootstrap build path must be absolute"
......
......@@ -115,8 +115,7 @@ try {
# one job runs with a clean cache and assures all packages we depend on are restored during
# the restore phase. As opposed to getting lucky based on a NuGet being available in the cache.
if ($cibuild) {
$nuget = Ensure-NuGet
Exec-Block { & $nuget locals all -clear } | Out-Host
Clear-PackageCache
}
$msbuild, $msbuildDir = Ensure-MSBuildAndDir -msbuildDir $msbuildDir
......
......@@ -48,7 +48,7 @@ function Publish-NuGet([string]$packageDir, [string]$uploadUrl) {
}
if (-not $test) {
Exec-Console $nuget "push $nupkg -Source $uploadUrl -ApiKey $apiKey -NonInteractive -Verbosity quiet"
Exec-Console $dotnet "nuget push $nupkg --source $uploadUrl --apiKey $apiKey -v q"
}
}
}
......@@ -147,7 +147,7 @@ function Normalize-BranchName([string]$branchName) {
try {
. (Join-Path $PSScriptRoot "..\..\..\build\scripts\build-utils.ps1")
$nuget = Ensure-NuGet
$dotnet = Ensure-DotnetExe
$nugetDir = Join-Path $configDir "NuGet"
if ($configDir -eq "") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册