Skip to content

Commit 30b5f44

Browse files
committed
Update build to use nuget from packages directory
1 parent cabbc68 commit 30b5f44

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

build/build.proj

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PaketBootstrapper>$(MSBuildThisFileDirectory.Replace('build\','.paket'))\paket.bootstrapper.exe</PaketBootstrapper>
1212
<Paket>$(MSBuildThisFileDirectory.Replace('build\','.paket'))\paket.exe</Paket>
1313
<PackagesFolder>$(MSBuildThisFileDirectory.Replace('build\','packages'))</PackagesFolder>
14-
<NuGet>$(PackagesFolder)\NuGet.CommandLine\tools$(LocalAppData)\NuGet.exe</NuGet>
14+
<NuGet>$(PackagesFolder)\NuGet.CommandLine\tools\NuGet.exe</NuGet>
1515
<MSBuild>&quot;$(MSBuildToolsPath)\MSBuild.exe&quot;</MSBuild>
1616
<XUnit>$(PackagesFolder)\xunit.runner.console\tools\xunit.console.exe</XUnit>
1717
<XUnitXslt>$(PackagesFolder)\xunit.runner.console\tools\NUnitXml.xslt</XUnitXslt>
@@ -48,11 +48,6 @@
4848
<Exec Command="$(Paket) install" />
4949
</Target>
5050

51-
<Target Name="DownloadNuGet" Condition="!Exists('$(NuGet)')">
52-
<MakeDir Directories="$(LocalAppData)\NuGet" />
53-
<Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -Command &quot;$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '$(NuGet)'&quot;" />
54-
</Target>
55-
5651
<Target Name="DownloadPaket" Condition="!Exists('$(PaketBootstrapper)')">
5752
<Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -Command &quot;$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://github.com/fsprojects/Paket/releases/download/$(PaketVersion)/paket.bootstrapper.exe' -OutFile '$(PaketBootstrapper)'&quot;" />
5853
<Exec Command="..\.paket\paket.bootstrapper.exe $(PaketVersion)" />
@@ -79,7 +74,7 @@
7974
OutputPaths="..\artifacts\TestResults\integration-tests.nunit.xml" />
8075
</Target>
8176

82-
<Target Name="MigrationTest" DependsOnTargets="DownloadNuGet">
77+
<Target Name="MigrationTest" DependsOnTargets="RestorePackages">
8378
<PropertyGroup>
8479
<MigrationSln>..\src\testing\migration\migration.sln</MigrationSln>
8580
</PropertyGroup>
@@ -110,7 +105,7 @@
110105

111106
<!-- The publish targets don't depend upon Package because of how they are used on the CI server. At this point the code has been packaged and all that needs
112107
to happen is to publish the artifact. -->
113-
<Target Name="PublishNuGet" DependsOnTargets="DownloadNuGet">
108+
<Target Name="PublishNuGet" DependsOnTargets="RestorePackages">
114109
<Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -File check-nuget-version-exists.ps1 $(Version)" ConsoleToMSBuild="true">
115110
<Output TaskParameter="ConsoleOutput" PropertyName="ShouldPublishToNuGet" />
116111
</Exec>
@@ -122,7 +117,7 @@
122117
Condition=" '$(ShouldPublishToNuGet)' == 'True' " />
123118
</Target>
124119

125-
<Target Name="PublishMyGet" DependsOnTargets="DownloadNuGet">
120+
<Target Name="PublishMyGet" DependsOnTargets="RestorePackages">
126121
<!-- We don't need to check for existing versions because MyGet lets you overwrite -->
127122
<!-- The environment variable BAMBOO_MYGET_PASSWORD comes from the nuget.password variable defined on the openstack.net plan in Bamboo -->
128123
<Exec Command="$(NuGet) push ..\artifacts\packages\openstack.net.$(Version).nupkg %25BAMBOO_MYGET_PASSWORD%25 -Source https://www.myget.org/F/openstacknetsdk/api/v2"/>

0 commit comments

Comments
 (0)