enable Microsoft.DiaSymReader* packages to be overridden during build
This commit is contained in:
Родитель
316976ec39
Коммит
e13a0584ac
21
build.cmd
21
build.cmd
|
@ -605,6 +605,27 @@ if "%RestorePackages%" == "true" (
|
|||
|
||||
call %~dp0init-tools.cmd
|
||||
|
||||
echo ----------- Done with package restore, starting dependency uptake check -------------
|
||||
|
||||
if not "%PB_PackageVersionPropsUrl%" == "" (
|
||||
set dependencyUptakeDir=%~dp0Tools\dependencyUptake
|
||||
if not exist "!dependencyUptakeDir!" mkdir "!dependencyUptakeDir!"
|
||||
|
||||
:: download package version overrides
|
||||
echo powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
|
||||
powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'"
|
||||
if ERRORLEVEL 1 echo Error downloading package version properties && goto :failure
|
||||
|
||||
:: prepare dependency uptake files
|
||||
echo %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build
|
||||
%_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build
|
||||
if ERRORLEVEL 1 echo Error building dependency uptake files && goto :failure
|
||||
|
||||
:: restore dependencies
|
||||
%_nugetexe% restore !dependencyUptakeDir!\packages.config -PackagesDirectory packages -ConfigFile !dependencyUptakeDir!\NuGet.config
|
||||
if ERRORLEVEL 1 echo Error restoring dependency uptake packages && goto :failure
|
||||
)
|
||||
|
||||
set _dotnetcliexe=%~dp0Tools\dotnetcli\dotnet.exe
|
||||
set _dotnet20exe=%~dp0Tools\dotnet20\dotnet.exe
|
||||
set NUGET_PACKAGES=%~dp0Packages
|
||||
|
|
16
build.sh
16
build.sh
|
@ -486,6 +486,22 @@ fi
|
|||
|
||||
# TODO: Check for existence of fsi (either on the system, or from the FSharp.Compiler.Tools package that was restored).
|
||||
|
||||
build_status "Done with package restore, starting dependency uptake check"
|
||||
|
||||
if [ "$PB_PACKAGEVERSIONPROPSURL" != "" ]; then
|
||||
dependencyUptakeDir="${_scriptdir}Tools/dependencyUptake"
|
||||
mkdir -p "$dependencyUptakeDir"
|
||||
|
||||
# download package version overrides
|
||||
{ printeval "curl '$PB_PACKAGEVERSIONPROPSURL' -o '$dependencyUptakeDir/PackageVersions.props'"; } || failwith "downloading package version properties failed"
|
||||
|
||||
# prepare dependency uptake files
|
||||
{ printeval "$_msbuildexe $msbuildflags ${scriptdir}build/projects/PrepareDependencyUptake.proj /t:Build"; } || failwith "building dependency uptake files failed"
|
||||
|
||||
# restore dependencies
|
||||
{ printeval "$_nugetexe restore '$dependencyUptakeDir/packages.config' -PackagesDirectory packages -ConfigFile '$dependencyUptakeDir/NuGet.config'"; } || failwith "restoring dependency uptake packages failed"
|
||||
fi
|
||||
|
||||
build_status "Done with package restore, starting proto"
|
||||
|
||||
# Decide if Proto need building
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<DependencyUptakeDirectory>$(MSBuildThisFileDirectory)..\..\Tools\dependencyUptake</DependencyUptakeDirectory>
|
||||
<PackageVersionsPropsFile>$(DependencyUptakeDirectory)\PackageVersions.props</PackageVersionsPropsFile>
|
||||
<PackagesConfigFile>$(DependencyUptakeDirectory)\packages.config</PackagesConfigFile>
|
||||
<NuGetConfigFile>$(DependencyUptakeDirectory)\NuGet.config</NuGetConfigFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(PackageVersionsPropsFile)" />
|
||||
|
||||
<!-- Prepare a dummy packages.config -->
|
||||
<ItemGroup>
|
||||
<PackagesConfigLines Include="<packages>" />
|
||||
<PackagesConfigLines Include=" <package id="Microsoft.DiaSymReader" version="$(MicrosoftDiaSymReaderPackageVersion)" />" />
|
||||
<PackagesConfigLines Include=" <package id="Microsoft.DiaSymReader.PortablePdb" version="$(MicrosoftDiaSymReaderPortablePdbPackageVersion)" />" />
|
||||
<PackagesConfigLines Include="</packages>" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Prepare a dummy NuGet.config -->
|
||||
<ItemGroup>
|
||||
<NuGetConfigLines Include="<configuration>" />
|
||||
<NuGetConfigLines Include=" <packageSources>" />
|
||||
<NuGetConfigLines Include=" <clear />" />
|
||||
<NuGetConfigLines Include=" <add key="dependency-uptake" value="$(PB_RestoreSource)" />" />
|
||||
<NuGetConfigLines Include=" </packageSources>" />
|
||||
<NuGetConfigLines Include="</configuration>" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<WriteLinesToFile File="$(PackagesConfigFile)" Lines="@(PackagesConfigLines)" Overwrite="true" />
|
||||
<WriteLinesToFile File="$(NuGetConfigFile)" Lines="@(NuGetConfigLines)" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -82,6 +82,9 @@
|
|||
<MicrosoftVisualStudioThreadingVersion>15.3.23</MicrosoftVisualStudioThreadingVersion>
|
||||
<MicrosoftVisualStudioValidationVersion>15.3.15</MicrosoftVisualStudioValidationVersion>
|
||||
|
||||
<MicrosoftDiaSymReaderPackageVersion>1.1.0</MicrosoftDiaSymReaderPackageVersion>
|
||||
<MicrosoftDiaSymReaderPortablePdbPackageVersion>1.2.0</MicrosoftDiaSymReaderPortablePdbPackageVersion>
|
||||
|
||||
<!-- Frozen FSharp.Core package being built with this build -->
|
||||
<FSharpCore41TargetPackageVersion>4.1.19</FSharpCore41TargetPackageVersion>
|
||||
<FSharpCore41TargetMajorVersion>4.1</FSharpCore41TargetMajorVersion>
|
||||
|
@ -99,6 +102,7 @@
|
|||
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45</NUnitLibDir>
|
||||
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\</NUnitToolsLibDir>
|
||||
|
||||
<DependencyUptakePackageVersionPropsFile>$(MSBuildThisFileDirectory)..\Tools\dependencyUptake\PackageVersions.props</DependencyUptakePackageVersionPropsFile>
|
||||
|
||||
<!-- Localization -->
|
||||
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
|
||||
|
@ -106,6 +110,8 @@
|
|||
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(DependencyUptakePackageVersionPropsFile)" Condition="Exists('$(DependencyUptakePackageVersionPropsFile)')" />
|
||||
|
||||
<PropertyGroup Condition="'$(MicroBuildAssemblyFileLanguage)' == ''">
|
||||
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -671,10 +671,10 @@
|
|||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
|
||||
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
|
||||
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.$(MicrosoftDiaSymReaderPortablePdbPackageVersion)\lib\netstandard1.1\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.DiaSymReader">
|
||||
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
|
||||
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.$(MicrosoftDiaSymReaderPackageVersion)\lib\netstandard1.1\Microsoft.DiaSymReader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Reflection.Metadata">
|
||||
<HintPath>..\..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||
|
|
Загрузка…
Ссылка в новой задаче