Skip to content

Commit

Permalink
move NuGet.Config to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Feb 23, 2018
1 parent 161b3c2 commit 2d0452a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ For **Release**:

If you are behind a proxy server, NuGet client tool must be configured to use it:

.nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile .nuget\NuGet.Config
.nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile .nuget\NuGet.Config
.nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile .nuget\NuGet.Config
.nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile NuGet.Config
.nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile NuGet.Config
.nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile NuGet.Config

Where you should set proper proxy address, user name and password.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include $(topsrcdir)mono/config.make
.PHONY: restore build build-proto

restore:
MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile ./NuGet.Config
chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe
chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe
chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe
Expand Down
4 changes: 2 additions & 2 deletions .nuget/NuGet.Config → NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="artifacts" value="../artifacts" />
<add key="artifacts" value="../artifacts/4.2" />
<add key="artifacts" value="./artifacts" />
<add key="artifacts" value="./artifacts/4.2" />
<add key="myget.org fsharp-daily" value="https://www.myget.org/F/fsharp-daily/api/v3/index.json" />
<add key="myget.org roslyn-master-nightly" value="https://dotnet.myget.org/F/roslyn-master-nightly/api/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
Expand Down
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure
echo ---------------- Done with prepare, starting package restore ----------------

set _nugetexe="%~dp0.nuget\NuGet.exe"
set _nugetconfig="%~dp0.nuget\NuGet.Config"
set _nugetconfig="%~dp0NuGet.Config"

if "%RestorePackages%" == "true" (
if "%BUILD_FCS%" == "1" (
Expand Down
2 changes: 1 addition & 1 deletion fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Target "Restore" (fun _ ->
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../.nuget/NuGet.Config")) TimeSpan.MaxValue
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
if result <> 0 then failwithf "nuget restore %s failed" p
)

Expand Down
8 changes: 4 additions & 4 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@

<NuGetToolPath Condition="'$(NuGetToolPath)' == ''">$(FSharpSourcesRoot)\..\.nuget\</NuGetToolPath>
<NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
<NugetRestoreCommand>"$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"</NugetRestoreCommand>
<DnuRestoreCommand>"$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"</DnuRestoreCommand>
<NugetRestoreCommand>"$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config"</NugetRestoreCommand>
<DnuRestoreCommand>"$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config"</DnuRestoreCommand>

<!-- Current version of .NET Core does not support all semantics used in our packages,
so we ignore the pre-calculation in the lock file and calculate asset applicability in the build task -->
Expand Down Expand Up @@ -214,12 +214,12 @@
<Import Project="Microbuild.Settings.targets" Condition="'$(UseMicroBuild)' == 'true'"/>

<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(TargetDotnetProfile)' == 'coreclr' ">
<Exec Command="$(MSBuildThisFileDirectory)..\.nuget\nuget.exe restore -PackagesDirectory $(PackagesDir) -Config $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json" />
<Exec Command="$(MSBuildThisFileDirectory)..\.nuget\nuget.exe restore -PackagesDirectory $(PackagesDir) -Config $(MSBuildThisFileDirectory)..\NuGet.Config project.json" />
</Target>

<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore &#45;&#45;configfile $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json"/>
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore &#45;&#45;configfile $(MSBuildThisFileDirectory)..\NuGet.Config project.json"/>
</Target>

<Target Name="dotnetpublish" AfterTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
Expand Down
2 changes: 1 addition & 1 deletion vsintegration/vsintegration.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="RestoreVsIntegrationPackages" BeforeTargets="Build" Condition="'$(RestorePackages)' == ''">
<Exec Command=".\.nuget\NuGet.exe restore vsintegration\packages.config -PackagesDirectory packages -ConfigFile .\.nuget\NuGet.Config" WorkingDirectory="$(FSharpSourcesRoot)\.." />
<Exec Command=".\.nuget\NuGet.exe restore vsintegration\packages.config -PackagesDirectory packages -ConfigFile .\NuGet.Config" WorkingDirectory="$(FSharpSourcesRoot)\.." />
</Target>
</Project>

0 comments on commit 2d0452a

Please sign in to comment.