瀏覽代碼

Merge branch 'develop' of https://github.com/Reactive-Extensions/Rx.NET into UseCSharp7Patterns

Bart De Smet 8 年之前
父節點
當前提交
bb4bff74ba
共有 2 個文件被更改,包括 19 次插入7 次删除
  1. 6 5
      Rx.NET/Source/Directory.build.props
  2. 13 2
      Rx.NET/Source/build-new.ps1

+ 6 - 5
Rx.NET/Source/Directory.build.props

@@ -20,16 +20,17 @@
     <IncludeSymbols>false</IncludeSymbols>
     <IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
     <GetVersion Condition=" '$(NCrunch)' != '' ">false</GetVersion>
+    <SourceLinkEnabled>false</SourceLinkEnabled>
   </PropertyGroup>
   
   <ItemGroup>
     <PackageReference Include="GitVersionTask" Version="4.0.0-beta0011" PrivateAssets="All" /> 
-    <PackageReference Include="MSBuild.Sdk.Extras" Version="1.0.0" PrivateAssets="All" />
+    <PackageReference Include="MSBuild.Sdk.Extras" Version="1.0.2" PrivateAssets="All" />
   </ItemGroup>
   
-  <ItemGroup Condition="'$(IsTestProject)' != 'true'">
-    <PackageReference Include="SourceLink.Create.GitHub" Version="2.0.2" PrivateAssets="All" /> 
-    <DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.0.2" />
+  <ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false'">
+    <PackageReference Include="SourceLink.Create.GitHub" Version="2.1.0" PrivateAssets="All" /> 
+    <DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.1.0" />
   </ItemGroup>
   
   <!-- Workaround -->
@@ -48,4 +49,4 @@
       BeforeTargets="_GenerateRestoreProjectSpec"
       DependsOnTargets="GetVersion"
       Condition=" '$(GitVersion_Task_targets_Imported)' == 'True' " />
-</Project>
+</Project>

+ 13 - 2
Rx.NET/Source/build-new.ps1

@@ -52,7 +52,15 @@ msbuild "$scriptPath\System.Reactive.sln" /m /t:restore /p:Configuration=$config
 msbuild "$scriptPath\System.Reactive.sln" /m /t:restore /p:Configuration=$configuration
 
 Write-Host "Building $scriptPath\System.Reactive.sln" -Foreground Green
-msbuild "$scriptPath\System.Reactive.sln" /m /t:build /p:Configuration=$configuration 
+msbuild "$scriptPath\System.Reactive.sln" /t:build /p:Configuration=$configuration 
+if ($LastExitCode -ne 0) { 
+        Write-Host "Error with build" -Foreground Red
+        if($isAppVeyor) {
+          $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
+        }  
+}
+
 
 Write-Host "Building Packages" -Foreground Green
 msbuild "$scriptPath\src\System.Reactive\System.Reactive.csproj" /t:pack /p:Configuration=$configuration /p:PackageOutputPath=$artifacts /p:NoPackageAnalysis=true /p:NuGetBuildTasksPackTargets="workaround"
@@ -85,6 +93,7 @@ if($hasSignClientSecret) {
         Write-Host "Error signing $nupkg" -Foreground Red
         if($isAppVeyor) {
           $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
         }  
     }
     Write-Host "Finished signing $nupkg"
@@ -108,6 +117,7 @@ if ($LastExitCode -ne 0) {
 	Write-Host "Error with tests" -Foreground Red
 	if($isAppVeyor) {
 	  $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
 	}  
 }
 
@@ -118,6 +128,7 @@ if ($LastExitCode -ne 0) {
 	Write-Host "Error with tests" -Foreground Red
 	if($isAppVeyor) {
 	  $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
 	}  
 }
 
@@ -139,4 +150,4 @@ else
 {
   .\packages\ReportGenerator\tools\ReportGenerator.exe -reports:"$outputFile" -targetdir:"$outputPath"
   &"$outPutPath/index.htm"
-}
+}