From 316afb22e66d5664635154d32bb0d1eb89dd555a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 04:49:34 +0000 Subject: [PATCH 1/2] Bump codecov/codecov-action from 4.2.0 to 4.3.0 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4.2.0...v4.3.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-full.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-full.yml b/.github/workflows/test-full.yml index f593dc9d..544e66f6 100644 --- a/.github/workflows/test-full.yml +++ b/.github/workflows/test-full.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f20311f..a1debf37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 From 727b74c94324b2db1a196039a55cf2c41bdbdc4e Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Wed, 10 Apr 2024 23:57:53 +0300 Subject: [PATCH 2/2] More Crash Report related fixes. Improved the Html renderer --- build/common.props | 4 ++-- changelog.txt | 4 ++++ .../CrashUploader/BUTRCrashUploader.cs | 7 +++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build/common.props b/build/common.props index e5b20273..5581595c 100644 --- a/build/common.props +++ b/build/common.props @@ -5,7 +5,7 @@ 1.0.0 - 2.9.3 + 2.9.4 2.2.2 3.2.0.77 @@ -18,7 +18,7 @@ 1.1.0.104 3.0.0.138 5.0.221 - 13.0.0.68 + 13.0.0.69 diff --git a/changelog.txt b/changelog.txt index d5c46580..ea57b2a6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/src/Bannerlord.ButterLib/CrashUploader/BUTRCrashUploader.cs b/src/Bannerlord.ButterLib/CrashUploader/BUTRCrashUploader.cs index 8bd675a0..6ae61f4a 100644 --- a/src/Bannerlord.ButterLib/CrashUploader/BUTRCrashUploader.cs +++ b/src/Bannerlord.ButterLib/CrashUploader/BUTRCrashUploader.cs @@ -22,8 +22,7 @@ public async Task UploadAsync(CrashReportModel crashReportM { try { - var assembly = Assembly.GetExecutingAssembly(); - var uploadUrlAttr = assembly.GetCustomAttributes().FirstOrDefault(a => a.Key == "BUTRUploadUrl"); + var uploadUrlAttr = typeof(BUTRCrashUploader).Assembly.GetCustomAttributes().FirstOrDefault(a => a.Key == "BUTRUploadUrl"); if (uploadUrlAttr is null) return CrashUploaderResult.MetadataNotFound(); @@ -32,7 +31,7 @@ public async Task 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); @@ -43,7 +42,7 @@ public async Task 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();