Skip to content

Commit 03fe4b4

Browse files
Update nuget packages path and fix E2E tests (#609)
* Update nuget packages path * Update AspNetVNext value from https://dotnet.myget.org/ to https://www.myget.org/
1 parent 7392300 commit 03fe4b4

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

NuGet.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<add key="azure_app_service" value="https://www.myget.org/F/azure-appservice/api/v2" />
66
<add key="azure_app_service_staging" value="https://www.myget.org/F/azure-appservice-staging/api/v2" />
77
<add key="buildTools" value="https://www.myget.org/F/30de4ee06dd54956a82013fa17a3accb/" />
8-
<add key="AspNetVNext" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
8+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcore-dev/api/v3/index.json" />
99
</packageSources>
1010
</configuration>

tools/helper.psm1

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function Resolve-ProtoBufToolPath
131131
{
132132
if (-not $Script:protoc_Path) {
133133
Write-Log "Resolve the protobuf tools for auto-generating code"
134-
$nugetPath = "~/.nuget/packages"
134+
$nugetPath = Get-NugetPackagesPath
135135
$toolsPath = "$RepoRoot/tools"
136136

137137
if (-not (Test-Path "$toolsPath/obj/project.assets.json")) {
@@ -205,6 +205,23 @@ function Write-Log
205205
Write-Host -ForegroundColor $foregroundColor "${indentPrefix}${Message}"
206206
}
207207

208+
function Get-NugetPackagesPath
209+
{
210+
if ($env:NUGET_PACKAGES)
211+
{
212+
return $env:NUGET_PACKAGES
213+
}
214+
215+
if ($IsWindowsEnv)
216+
{
217+
return "${env:USERPROFILE}\.nuget\packages"
218+
}
219+
else
220+
{
221+
return "${env:HOME}/.nuget/packages"
222+
}
223+
}
224+
208225
#region Start-ResGen
209226

210227
$generated_code_template = @'

0 commit comments

Comments
 (0)