Skip to content

Commit

Permalink
fix: Fixed appearance of the last commit of every release in the next…
Browse files Browse the repository at this point in the history
… release.
  • Loading branch information
hennadiilu authored Jun 25, 2024
1 parent 1d53ec6 commit 7bff3a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Heleonix.Build/Targets/Hx_NetBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<_Hx_NetBuild_SigningProps Condition="Exists('$(Hx_NetBuild_SnkFile)')">SignAssembly=true;AssemblyOriginatorKeyFile=$(Hx_NetBuild_SnkFile)</_Hx_NetBuild_SigningProps>
<_Hx_NetBuild_VersionProps Condition="'$(Hx_NetBuild_Version)' != ''">Version=$(Hx_NetBuild_Version)</_Hx_NetBuild_VersionProps>
<_Hx_NetBuild_AssemblyVersionProps Condition="'$(Hx_NetBuild_AssemblyVersion)' != ''">AssemblyVersion=$(Hx_NetBuild_AssemblyVersion)</_Hx_NetBuild_AssemblyVersionProps>
<_Hx_NetBuild_ReleaseNotes Condition="'$(Hx_NetBuild_ReleaseNotesFile)' != ''">PackageReleaseNotes=&quot;$([System.IO.File]::ReadAllText('$(Hx_NetBuild_ReleaseNotesFile)').Trim())&quot;</_Hx_NetBuild_ReleaseNotes>
<_Hx_NetBuild_ReleaseNotes Condition="'$(Hx_NetBuild_ReleaseNotesFile)' != ''">PackageReleaseNotes=$([System.IO.File]::ReadAllText('$(Hx_NetBuild_ReleaseNotesFile)').Trim())</_Hx_NetBuild_ReleaseNotes>
</PropertyGroup>
<MSBuild
Projects="$(Hx_NetBuild_SlnFile)"
Expand Down
8 changes: 4 additions & 4 deletions src/Heleonix.Build/Tasks/Hx_GitHubCommitChangeLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ private static TaskItem CreateTaskItemFromChangeMatch(Regex changeLogRegExp, Mat

private void CollectChanges(
HttpClient client,
string createdAt,
string since,
(int Major, int Minor, int Patch) latestVersion,
RegexOptions regExpOptions,
string tagSource)
{
var createdAtDateTime = createdAt != null ? DateTime.Parse(createdAt, DateTimeFormatInfo.InvariantInfo) : DateTime.MinValue;
var sinceDateTime = since != null ? DateTime.Parse(since, DateTimeFormatInfo.InvariantInfo) : DateTime.MinValue;

var previousVersion = $"{latestVersion.Major}.{latestVersion.Minor}.{latestVersion.Patch}";

Expand All @@ -138,7 +138,7 @@ private void CollectChanges(
{
commitPage = client.GetFromJsonAsync<JsonArray>(
$"{this.GitHubRepositoryApiUrl}/commits?sha={tagSource}&per_page={100}&page={pageNumber}"
+ (createdAt != null ? $"&since={createdAt}" : string.Empty));
+ (since != null ? $"&since={since}" : string.Empty));

commitPage.Wait(3 * 60 * 1000);

Expand All @@ -149,7 +149,7 @@ private void CollectChanges(
c["commit"]["committer"]["date"].GetValue<string>(),
DateTimeFormatInfo.InvariantInfo);

if (dateTime < createdAtDateTime)
if (dateTime <= sinceDateTime)
{
continue;
}
Expand Down

0 comments on commit 7bff3a9

Please sign in to comment.