|
7 | 7 | <Version Condition=" '$(bamboo_GitVersion_NuGetVersion)' != '' ">$(bamboo_GitVersion_NuGetVersion)</Version> |
8 | 8 | <Version Condition=" '$(bamboo_GitVersion_NuGetVersion)' == '' ">0.0.0-dev</Version> |
9 | 9 |
|
10 | | - <ILMerge>$(MSBuildThisFileDirectory.Replace('build\','src'))\packages\ILMerge.2.14.1208\tools\ILMerge.exe</ILMerge> |
11 | | - <NuGet>$(LocalAppData)\NuGet\NuGet.exe</NuGet> |
| 10 | + <PaketVersion>3.4.0</PaketVersion> |
| 11 | + <PaketBootstrapper>$(MSBuildThisFileDirectory.Replace('build\','.paket'))\paket.bootstrapper.exe</PaketBootstrapper> |
| 12 | + <Paket>$(MSBuildThisFileDirectory.Replace('build\','.paket'))\paket.exe</Paket> |
| 13 | + <PackagesFolder>$(MSBuildThisFileDirectory.Replace('build\','packages'))</PackagesFolder> |
| 14 | + <NuGet>$(PackagesFolder)\NuGet.CommandLine\tools\NuGet.exe</NuGet> |
12 | 15 | <MSBuild>"$(MSBuildToolsPath)\MSBuild.exe"</MSBuild> |
13 | | - <XUnit>$(MSBuildThisFileDirectory.Replace('build\','src'))\packages\xunit.runner.console.2.0.0\tools\xunit.console.exe</XUnit> |
14 | | - <XUnitXslt>$(MSBuildThisFileDirectory.Replace('build\','src'))\packages\xunit.runner.console.2.0.0\tools\NUnitXml.xslt</XUnitXslt> |
| 16 | + <XUnit>$(PackagesFolder)\xunit.runner.console\tools\xunit.console.exe</XUnit> |
| 17 | + <XUnitXslt>$(PackagesFolder)\xunit.runner.console\tools\NUnitXml.xslt</XUnitXslt> |
| 18 | + <ILMerge>$(PackagesFolder)\ILMerge\tools\ILMerge.exe</ILMerge> |
15 | 19 | </PropertyGroup> |
16 | 20 |
|
17 | 21 | <Target Name="CI"> |
|
33 | 37 |
|
34 | 38 | <Target Name="Documentation" DependsOnTargets="Build"> |
35 | 39 | <PropertyGroup> |
36 | | - <SHFBROOT>$(MSBuildThisFileDirectory.Replace('build\','src'))\packages\EWSoftware.SHFB.2014.11.22-beta\tools</SHFBROOT> |
| 40 | + <SHFBROOT>$(PackagesFolder)\EWSoftware.SHFB\tools</SHFBROOT> |
37 | 41 | </PropertyGroup> |
38 | 42 |
|
39 | | - <Exec Command="$(NuGet) restore ..\src\Documentation\Documentation.sln" /> |
40 | 43 | <Exec Command="(set SHFBROOT=$(SHFBROOT)) & $(MSBuild) ..\src\Documentation\Documentation.sln /p:Configuration=$(Configuration) /nologo /v:minimal" /> |
41 | 44 | </Target> |
42 | 45 |
|
43 | | - <Target Name="RestorePackages" DependsOnTargets="DownloadNuGet"> |
44 | | - <Exec Command="$(NuGet) restore ..\src\openstack.net.sln" /> |
| 46 | + <Target Name="RestorePackages" DependsOnTargets="DownloadPaket"> |
| 47 | + <Exec Command="$(PaketBootstrapper)" /> |
| 48 | + <Exec Command="$(Paket) install" /> |
45 | 49 | </Target> |
46 | 50 |
|
47 | | - <Target Name="DownloadNuGet" Condition="!Exists('$(NuGet)')"> |
48 | | - <MakeDir Directories="$(LocalAppData)\NuGet" /> |
49 | | - <Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '$(NuGet)'"" /> |
| 51 | + <Target Name="DownloadPaket" Condition="!Exists('$(PaketBootstrapper)')"> |
| 52 | + <Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://github.com/fsprojects/Paket/releases/download/$(PaketVersion)/paket.bootstrapper.exe' -OutFile '$(PaketBootstrapper)'"" /> |
| 53 | + <Exec Command="..\.paket\paket.bootstrapper.exe $(PaketVersion)" /> |
50 | 54 | </Target> |
51 | 55 |
|
52 | 56 | <Target Name="UnitTest" DependsOnTargets="Build"> |
|
70 | 74 | OutputPaths="..\artifacts\TestResults\integration-tests.nunit.xml" /> |
71 | 75 | </Target> |
72 | 76 |
|
73 | | - <Target Name="MigrationTest" DependsOnTargets="DownloadNuGet"> |
| 77 | + <Target Name="MigrationTest" DependsOnTargets="RestorePackages"> |
74 | 78 | <PropertyGroup> |
75 | 79 | <MigrationSln>..\src\testing\migration\migration.sln</MigrationSln> |
76 | 80 | </PropertyGroup> |
|
101 | 105 |
|
102 | 106 | <!-- 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 |
103 | 107 | to happen is to publish the artifact. --> |
104 | | - <Target Name="PublishNuGet" DependsOnTargets="DownloadNuGet"> |
| 108 | + <Target Name="PublishNuGet"> |
105 | 109 | <Exec Command="@powershell -NoProfile -ExecutionPolicy unrestricted -File check-nuget-version-exists.ps1 $(Version)" ConsoleToMSBuild="true"> |
106 | 110 | <Output TaskParameter="ConsoleOutput" PropertyName="ShouldPublishToNuGet" /> |
107 | 111 | </Exec> |
|
113 | 117 | Condition=" '$(ShouldPublishToNuGet)' == 'True' " /> |
114 | 118 | </Target> |
115 | 119 |
|
116 | | - <Target Name="PublishMyGet" DependsOnTargets="DownloadNuGet"> |
| 120 | + <Target Name="PublishMyGet"> |
117 | 121 | <!-- We don't need to check for existing versions because MyGet lets you overwrite --> |
118 | 122 | <!-- The environment variable BAMBOO_MYGET_PASSWORD comes from the nuget.password variable defined on the openstack.net plan in Bamboo --> |
119 | 123 | <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