Skip to content

Commit

Permalink
Merge pull request #387 from BUTR/dev
Browse files Browse the repository at this point in the history
v2.9.4
  • Loading branch information
Aragas authored Apr 10, 2024
2 parents f61da3e + a996d5f commit 9c9bea5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
path: coveragereport

- name: Upload ReportGenerator to CodeCov
uses: codecov/codecov-action@v4.2.0
uses: codecov/codecov-action@v4.3.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coveragereport/Cobertura.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
path: coveragereport

- name: Upload ReportGenerator to CodeCov
uses: codecov/codecov-action@v4.2.0
uses: codecov/codecov-action@v4.3.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coveragereport/Cobertura.xml
Expand Down
4 changes: 2 additions & 2 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<BaseGameVersion>1.0.0</BaseGameVersion>
<!--Module Version-->
<Version>2.9.3</Version>
<Version>2.9.4</Version>
<!--Harmony Version-->
<HarmonyVersion>2.2.2</HarmonyVersion>
<HarmonyExtensionsVersion>3.2.0.77</HarmonyExtensionsVersion>
Expand All @@ -18,7 +18,7 @@
<BuildResourcesVersion>1.1.0.104</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.138</BUTRSharedVersion>
<BUTRModuleManagerVersion>5.0.221</BUTRModuleManagerVersion>
<CrashReportVersion>13.0.0.68</CrashReportVersion>
<CrashReportVersion>13.0.0.69</CrashReportVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 2.9.4
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.x
* More Crash Report related fixes. Improved the Html renderer
---------------------------------------------------------------------------------------------------
Version: 2.9.3
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.x
* More Crash Report related fixes. Improved the Html renderer
Expand Down
7 changes: 3 additions & 4 deletions src/Bannerlord.ButterLib/CrashUploader/BUTRCrashUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public async Task<CrashUploaderResult> UploadAsync(CrashReportModel crashReportM
{
try
{
var assembly = Assembly.GetExecutingAssembly();
var uploadUrlAttr = assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(a => a.Key == "BUTRUploadUrl");
var uploadUrlAttr = typeof(BUTRCrashUploader).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(a => a.Key == "BUTRUploadUrl");
if (uploadUrlAttr is null)
return CrashUploaderResult.MetadataNotFound();

Expand All @@ -32,7 +31,7 @@ public async Task<CrashUploaderResult> UploadAsync(CrashReportModel crashReportM
var httpWebRequest = WebRequest.CreateHttp(uploadUrlAttr.Value);
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = "application/json";
httpWebRequest.UserAgent = $"ButterLib CrashUploader v{assembly.GetName().Version}";
httpWebRequest.UserAgent = $"ButterLib CrashUploader v{typeof(BUTRCrashUploader).Assembly.GetName().Version}";
httpWebRequest.Headers.Add("Content-Encoding", "gzip,deflate");

using var writeStream = await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false);
Expand All @@ -43,7 +42,7 @@ public async Task<CrashUploaderResult> UploadAsync(CrashReportModel crashReportM
if (response is not HttpWebResponse httpWebResponse)
return CrashUploaderResult.ResponseIsNotHttpWebResponse();

if (httpWebResponse.StatusCode is not HttpStatusCode.OK or HttpStatusCode.Created)
if (httpWebResponse.StatusCode is not HttpStatusCode.OK and not HttpStatusCode.Created)
return CrashUploaderResult.WrongStatusCode(httpWebResponse.StatusCode.ToString());

using var stream = response.GetResponseStream();
Expand Down

0 comments on commit 9c9bea5

Please sign in to comment.