1
0
Форкнуть 0

Merge pull request #229 from Microsoft/dnduffy/MakeBuildSigningOptional

Made signing check for the existence of the signing DLL.
This commit is contained in:
David Duffy 2016-06-23 17:23:16 -07:00 коммит произвёл GitHub
Родитель 1c6915430c 6e71645e95
Коммит 49df850417
8 изменённых файлов: 25 добавлений и 12 удалений

Просмотреть файл

@ -3,7 +3,6 @@
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="XunitMyget" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="ASPNET1" value="https://dotnet.myget.org/F/aspnet1/api/v3/index.json" />
</packageSources>
<disabledPackageSources />

Просмотреть файл

@ -4,10 +4,7 @@
<!-- TODO: Figure out how to get signing to work in MicroBuildV2 for .xproj without using this "unsupported" manual approach. -->
<PathToSigningDll>$(BUILD_ARTIFACTSTAGINGDIRECTORY)\MicroBuild\Plugins\MicroBuild.Plugins.Signing.1.0.200\build\MicroBuild.Signing.dll</PathToSigningDll>
<RunningInMicroBuild Condition="Exists('$(AGENT_BUILDDIRECTORY)')">true</RunningInMicroBuild>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly Condition="Exists('$(PathToSigningDll)')">true</SignAssembly>
<AssemblyOriginatorKeyFile>$(CommonBuildPropsLocation)\Keys\InternalKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
@ -29,7 +26,7 @@
<UsingTask TaskName="SignFiles" AssemblyFile="$(PathToSigningDll)" Condition="'$(RunningInMicroBuild)' == 'true'" />
<Target Name="SignFiles" AfterTargets="AfterBuild" DependsOnTargets="AfterBuild">
<SignFiles Condition="'$(RunningInMicroBuild)' == 'true'"
<SignFiles Condition="'$(RunningInMicroBuild)' == 'true' AND '$(SignAssembly)' == 'true'"
Files="@(FilesToSign)"
BinariesDirectory="$([System.IO.Path]::GetDirectoryName(%(FilesToSign.FullPath)))"
IntermediatesDirectory="$([System.IO.Path]::GetDirectoryName(%(FilesToSign.FullPath)))"

Просмотреть файл

@ -5,11 +5,18 @@
<PropertyGroup>
<CliZipFile>$(BUILD_ARTIFACTSTAGINGDIRECTORY)\dotnet-dev-win-x64.latest.zip</CliZipFile>
<CliToolsPath>$(BUILD_ARTIFACTSTAGINGDIRECTORY)\dotnet-dev-win-x64.latest</CliToolsPath>
<!-- Library -->
<ProjectToBuild>.\src\Microsoft.ApplicationInsights.AspNetCore\project.json</ProjectToBuild>
</PropertyGroup>
<ItemGroup>
<Solution Include="src\Microsoft.ApplicationInsights.AspNetCore\Microsoft.ApplicationInsights.AspNetCore.xproj" />
<!--<Solution Include="src\Microsoft.ApplicationInsights.AspNetCore\Microsoft.ApplicationInsights.AspNetCore.xproj" />-->
<!-- Tests -->
<TestProject Condition="$(RunTests) != '' And $(RunTests)" Include="test\Microsoft.ApplicationInsights.AspNetCore.Tests\project.json" />
<TestProject Condition="$(RunTests) != '' And $(RunTests)" Include="test\FunctionalTestUtils\project.json" />
<TestProject Condition="$(RunTests) != '' And $(RunTests)" Include="test\WebApiShimFw46.FunctionalTests\project.json" />
<TestProject Condition="$(RunTests) != '' And $(RunTests)" Include="test\EmptyApp.FunctionalTests\project.json" />
<!--<TestProject Condition="$(RunTests) != '' And $(RunTests)" Include="test\MVCFramework45.FunctionalTests\project.json" />-->
</ItemGroup>
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
@ -87,8 +94,13 @@
<Message Importance="high" Text="ComputerName: $(ComputerName)"></Message>
<Message Importance="high" Text="User: $(USERDOMAIN)\$(USERNAME)"></Message>
<Message Importance="high" Text="RunningInMicroBuild: $(RunningInMicroBuild)"></Message>
<Message Importance="high" Text="Intermediate Output Path: $(BaseIntermediateOutputPath)"></Message>
<Message Importance="high" Text="Bin Root: $(BinRoot)"></Message>
<Message Importance="high" Text="Configuration: $(Configuration)"></Message>
<Message Importance="high" Text="CLI Zip: $(CliZipFile)"></Message>
<Message Importance="high" Text="CLI Tools Path: $(CliToolsPath)"></Message>
<Message Importance="high" Text="Run Tests: $(RunTests)"></Message>
<Message Importance="high" Text="Sign Assembly: $(SignAssembly)"></Message>
</Target>
<Target Name="DownloadCLI">
@ -97,9 +109,14 @@
</Target>
<Target Name="Build" DependsOnTargets="CheckBuildParameters;DownloadCLI">
<Exec Command='"$(CliToolsPath)\dotnet.exe" --version' />
<Exec Command=".\nuget.exe locals all -clear" ContinueOnError="ErrorAndStop" />
<Exec Command='"$(CliToolsPath)\dotnet.exe" restore $(ProjectToBuild)' ContinueOnError="ErrorAndStop" />
<Exec Command='"$(CliToolsPath)\dotnet.exe" build $(ProjectToBuild) -c $(Configuration)' ContinueOnError="ErrorAndStop" />
<Message Condition="$(RunTests) != '' And $(RunTests)" Importance="high" Text="Running tests..."></Message>
<Exec Condition="$(RunTests) != '' And $(RunTests)" Command='"$(CliToolsPath)\dotnet.exe" restore %(TestProject.Identity)' ContinueOnError="ErrorAndStop" />
<Exec Condition="$(RunTests) != '' And $(RunTests)" Command='"$(CliToolsPath)\dotnet.exe" build %(TestProject.Identity) -c $(Configuration)' ContinueOnError="ErrorAndStop" />
<Exec Condition="$(RunTests) != '' And $(RunTests)" Command='"$(CliToolsPath)\dotnet.exe" test %(TestProject.Identity)' ContinueOnError="ErrorAndStop" />
</Target>
<Target Name="Clean">

Просмотреть файл

@ -9,7 +9,7 @@
"dependencies": {
"FunctionalTestUtils": { "target": "project" },
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-rc3-*",
"dotnet-test-xunit": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.NETCore.Platforms": "1.0.1"
},

Просмотреть файл

@ -9,7 +9,7 @@
"Microsoft.ApplicationInsights.AspNetCore": {
"target": "project"
},
"dotnet-test-xunit": "1.0.0-rc3-*",
"dotnet-test-xunit": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0",
"Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0"

Просмотреть файл

@ -24,7 +24,7 @@
"FunctionalTestUtils": { "target": "project" },
"Microsoft.ApplicationInsights.AspNetCore": { "target": "project" },
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-rc3-*",
"dotnet-test-xunit": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",

Просмотреть файл

@ -11,7 +11,7 @@
"dependencies": {
"xunit": "2.1.0",
"Microsoft.ApplicationInsights.AspNetCore": { "target": "project" },
"dotnet-test-xunit": "1.0.0-rc3-*",
"dotnet-test-xunit": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0",
"Microsoft.AspNetCore.Http": "1.0.0",
"Microsoft.AspNetCore.Http.Extensions": "1.0.0",

Просмотреть файл

@ -14,7 +14,7 @@
"Microsoft.ApplicationInsights.AspNetCore": { "target": "project" },
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-rc3-*",
"dotnet-test-xunit": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Mvc.WebApiCompatShim": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",