Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Jun 23, 2023
2 parents 79a0959 + 065e2f8 commit f6ce263
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitReader" Version="0.12.0" />
<PackageReference Include="GitReader" Version="0.13.0" />
<PackageReference Include="NamingFormatter" Version="2.2.0" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="RelaxVersioner" Version="2.14.0" PrivateAssets="all" />
<PackageReference Include="RelaxVersioner" Version="2.15.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 6 additions & 5 deletions CenterCLR.RelaxVersioner.Core/Processor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ private static async Task<Result> WriteVersionSourceFileAsync(
await targetBranch.GetHeadCommitAsync(ct) :
null;

var commitId = commit?.Hash.ToString() ?? string.Empty;
var commitId = commit?.Hash.ToString() ??
"unknown";

static string FormatSignature(Signature? sig) => sig is { } s ?
(s.MailAddress is { } ma ? $"{s.Name} <{ma}>" : s.Name) :
Expand Down Expand Up @@ -168,13 +169,13 @@ static string FormatSignature(Signature? sig) => sig is { } s ?
intDateVersion,
epochIntDateVersion,
commitId,
targetBranch.Name,
targetBranch?.Name,
tags,
commitDate,
author,
committer,
commit.Subject,
commit.Body);
commit?.Subject,
commit?.Body);
}

public async Task<Result> RunAsync(
Expand All @@ -200,7 +201,7 @@ public async Task<Result> RunAsync(
logger,
writer,
context,
repository.Head,
repository?.Head,
DateTimeOffset.Now,
ruleSet,
importSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="RelaxVersioner" Version="2.14.0" PrivateAssets="all" />
<PackageReference Include="RelaxVersioner" Version="2.15.0" PrivateAssets="all" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion CenterCLR.RelaxVersioner/CenterCLR.RelaxVersioner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="RelaxVersioner" Version="2.14.0" PrivateAssets="all" />
<PackageReference Include="RelaxVersioner" Version="2.15.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ nuspecファイルを使ってパッケージを生成する場合は、デフ

## 履歴

* 2.16.0:
* 初期化されていない Git リポジトリで NRE が発生する問題を修正。
* 2.15.0:
* Gitリポジトリの読み取りを、libgit2sharp から [GitReader](https://github.com/kekyo/GitReader) に変更しました。
ネイティブライブラリに依存しなくなったため、動作環境の制限が緩和されます。
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ When you are using a nuspec file to generate a NuGet package, there are addition

## History

* 2.16.0:
* Fixed causing NRE on uninitialized git repository.
* 2.15.0:
* Changed reading of Git repositories using [GitReader](https://github.com/kekyo/GitReader) instead of libgit2sharp.
The native library no longer depends on it, which eases the limitation of the operating environment.
Expand Down

0 comments on commit f6ce263

Please sign in to comment.