Skip to content

Commit

Permalink
Fixing PR #59 for issue related to #56 (#60)
Browse files Browse the repository at this point in the history
* Updates generation of nuget packages with the fix available on dotnet/sourcelink#572

* #56: fixed missing exception reporting
  • Loading branch information
mariomastrodicasa authored Oct 18, 2021
1 parent 4b085ca commit a88b6de
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
10 changes: 9 additions & 1 deletion src/CLI/JCOReflectorCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Copyright>Copyright © MASES s.r.l. 2021</Copyright>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>1.7.2.0</Version>
<Version>1.7.3.0</Version>
<Product>MASES.JCOReflectorCLI</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TargetFrameworks>net461;netcoreapp3.1;net5.0</TargetFrameworks>
Expand All @@ -28,6 +28,14 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Common\JCOReflector.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Fix start https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<!-- Fix end -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/JCOReflectorGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Copyright>Copyright © MASES s.r.l. 2021</Copyright>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>1.7.2.0</Version>
<Version>1.7.3.0</Version>
<Product>JCOReflectorGUI</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TargetFrameworks>net461;netcoreapp3.1;net5.0-windows</TargetFrameworks>
Expand Down
11 changes: 9 additions & 2 deletions src/engine/JCOReflectorEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Copyright>Copyright © MASES s.r.l. 2021</Copyright>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>1.7.2.0</Version>
<Version>1.7.3.0</Version>
<Product>MASES.JCOReflectorEngine</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TargetFrameworks>net461;netcoreapp3.1;net5.0;net5.0-windows</TargetFrameworks>
Expand All @@ -27,13 +27,20 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Common\JCOReflector.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Fix start https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<!-- Fix end -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'net461'">
<DefineConstants>$(DefineConstants);NET_CORE;</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="System.IO.Compression" />
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/engine/JavaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void CompileClasses(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down Expand Up @@ -141,7 +141,7 @@ public static void GenerateDocs(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down Expand Up @@ -293,7 +293,7 @@ public static void CreatePOM(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down Expand Up @@ -333,7 +333,7 @@ public static void ExtractPOM(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down Expand Up @@ -388,7 +388,7 @@ public static void CreateJars(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engine/Reflector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public static async Task ExecuteAction(object o)
{
JobManager.EndOperation(new EndOperationEventArgs(reportStr, failed));
}
if (JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
if (storedException != null && JobManager.ErrorReporting.HasFlag(ErrorReportingType.Exception))
{
throw storedException;
}
Expand Down

0 comments on commit a88b6de

Please sign in to comment.