Skip to content

Commit

Permalink
Backed out .net core 5 as needs all the build utils to be rebuilt first
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Nov 19, 2020
1 parent d30052b commit 9e664fa
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Credfeto.ChangeLog.Cmd/Credfeto.ChangeLog.Cmd.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifiers>win10-x64;win81-x64;osx.10.12-x64</RuntimeIdentifiers>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<WarningsAsErrors/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<WarningsAsErrors/>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
Expand Down
11 changes: 8 additions & 3 deletions src/Credfeto.ChangeLog/ChangeLogChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Credfeto.ChangeLog.Management
public static class ChangeLogChecker
{
private static readonly Regex HunkPositionRegex =
new(pattern: @"^@@\s*\-(?<OriginalFileStart>\d*)(,(?<OriginalFileEnd>\d*))?\s*\+(?<CurrentFileStart>\d*)(,(?<CurrentFileChangeLength>\d*))?\s*@@",
RegexOptions.Compiled | RegexOptions.Multiline);
new Regex(pattern: @"^@@\s*\-(?<OriginalFileStart>\d*)(,(?<OriginalFileEnd>\d*))?\s*\+(?<CurrentFileStart>\d*)(,(?<CurrentFileChangeLength>\d*))?\s*@@",
RegexOptions.Compiled | RegexOptions.Multiline);

public static async Task<bool> ChangeLogModifiedInReleaseSectionAsync(string changeLogFileName, string originBranchName)
{
Expand Down Expand Up @@ -58,8 +58,13 @@ public static async Task<bool> ChangeLogModifiedInReleaseSectionAsync(string cha

MatchCollection matches = HunkPositionRegex.Matches(patchDetails);

foreach (Match match in matches)
foreach (Match? match in matches)
{
if (match == null)
{
continue;
}

int changeStart = Convert.ToInt32(match.Groups["CurrentFileStart"]
.Value);

Expand Down
6 changes: 3 additions & 3 deletions src/Credfeto.ChangeLog/ChangeLogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Credfeto.ChangeLog.Management
{
public static class ChangeLogReader
{
private static readonly Regex RemoveComments = new(pattern: "<!--[\\s\\S]*?-->", RegexOptions.Compiled | RegexOptions.Multiline);
private static readonly Regex VersionHeaderMatch = new(pattern: @"^##\s\[(\d+)", options: RegexOptions.Compiled);
private static readonly Regex RemoveComments = new Regex(pattern: "<!--[\\s\\S]*?-->", RegexOptions.Compiled | RegexOptions.Multiline);
private static readonly Regex VersionHeaderMatch = new Regex(pattern: @"^##\s\[(\d+)", options: RegexOptions.Compiled);

public static async Task<string> ExtractReleaseNodesFromFileAsync(string changeLogFileName, string version)
{
Expand Down Expand Up @@ -41,7 +41,7 @@ public static string ExtractReleaseNotes(string changeLog, string version)

string previousLine = string.Empty;

StringBuilder releaseNotes = new();
StringBuilder releaseNotes = new StringBuilder();

for (int i = foundStart; i < foundEnd; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Credfeto.ChangeLog/Credfeto.ChangeLog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<WarningsAsErrors/>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.100",
"version": "3.1.403",
"allowPrerelease": false,
"rollForward": "disable"
}
Expand Down

0 comments on commit 9e664fa

Please sign in to comment.