Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7.7.6 #803

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ aliases:
- &2020 "2020.3.48f1"
- &2021 "2021.3.36f1"
- &2022 "2022.3.22f1"
- &2023 "2023.2.17f1"
- &2023 "2023.2.19f1"


agents:
Expand Down Expand Up @@ -186,8 +186,6 @@ steps:
- label: Run WebGL e2e tests for Unity 2020
timeout_in_minutes: 30
depends_on: "cocoa-webgl-2020-fixtures"
agents:
queue: opensource-mac-cocoa-11
env:
UNITY_VERSION: *2020
plugins:
Expand Down Expand Up @@ -221,8 +219,6 @@ steps:
- label: Run WebGL e2e tests for Unity 2022
timeout_in_minutes: 30
depends_on: 'cocoa-webgl-2022-fixtures'
agents:
queue: opensource-mac-cocoa-11
env:
UNITY_VERSION: *2022
plugins:
Expand All @@ -238,8 +234,6 @@ steps:
- label: Run WebGL e2e tests for Unity 2023
timeout_in_minutes: 30
depends_on: 'cocoa-webgl-2023-fixtures'
agents:
queue: opensource-mac-cocoa-11
env:
UNITY_VERSION: *2023
plugins:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 7.7.6 (2024-05-17)

- Fixed issue where meta files for the MacOS bundle were not generated. [#802](https://github.com/bugsnag/bugsnag-unity/pull/802)

## 7.7.5 (2024-05-02)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var target = Argument("target", "Default");
var solution = File("./BugsnagUnity.sln");
var configuration = Argument("configuration", "Release");
var project = File("./src/BugsnagUnity/BugsnagUnity.csproj");
var version = "7.7.5";
var version = "7.7.6";

Task("Restore-NuGet-Packages")
.Does(() => NuGetRestore(solution));
Expand Down
10 changes: 8 additions & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@

BeforeAll do
$api_key = 'a35a2a72bd230ac0aa0f52715bbdc6aa'
Maze.config.enforce_bugsnag_integrity = false

if Maze.config.os&.downcase == 'macos'
# The default macOS Crash Reporter "#{app_name} quit unexpectedly" alert grabs focus which can cause tests to flake.
# This option, which appears to have been introduced in macOS 10.11, displays a notification instead of the alert.
Expand Down Expand Up @@ -113,6 +111,14 @@
end
end

Before do |scenario|
# Detect if we're running the webgl tests
if Maze.config.farm.to_s.eql?('local')
# Allows each scenario to auto retry once due to instability in the local browser
scenario.tags << Cucumber::Core::Test::Tag.new(nil, '@retry')
end
end

After do |scenario|
next if scenario.status == :skipped

Expand Down
17 changes: 17 additions & 0 deletions src/BugsnagUnity/Delivery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using BugsnagUnity.Payload;
using UnityEngine;
using UnityEngine.Networking;
using System.Security.Cryptography;

namespace BugsnagUnity
{
Expand Down Expand Up @@ -187,6 +188,8 @@ IEnumerator PushToServer(IPayload payload)
{
req.SetRequestHeader("Content-Type", "application/json");
req.SetRequestHeader("Bugsnag-Sent-At", DateTimeOffset.Now.ToString("o", CultureInfo.InvariantCulture));
req.SetRequestHeader("Bugsnag-Integrity", "sha1 " + Hash(body));

foreach (var header in payload.Headers)
{
req.SetRequestHeader(header.Key, header.Value);
Expand Down Expand Up @@ -278,6 +281,20 @@ private byte[] PrepareEventBodySimple(IPayload payload)
return serialisedPayload;
}

private string Hash(byte[] input)
{
using (SHA1Managed sha1 = new SHA1Managed())
{
var hash = sha1.ComputeHash(input);
var sb = new StringBuilder(hash.Length * 2);
foreach (byte b in hash)
{
sb.Append(b.ToString("x2"));
}
return sb.ToString();
}
}

private bool TruncateBreadcrumbs(Dictionary<string, object> @event, int bytesToRemove)
{
var breadcrumbsList = (@event[EVENT_KEY_BREADCRUMBS] as Dictionary<string, object>[]).ToList();
Expand Down
15 changes: 12 additions & 3 deletions upm-tools/build-upm-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ fi

VERSION=$1

if [ -z "$UNITY_VERSION" ]
if [ -z "$UNITY_UPM_VERSION" ]
then
echo "UNITY_VERSION must be set"
echo "UNITY_UPM_VERSION must be set"
exit 1
fi

UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS"
#There is a bug in some versions of unity 2020, 2021 and 2022 where macos bundles will not be imported as a single plugin file.
#In which case all sub dirs and files must have .meta files to work with UPM.
#Building the UPM package with unity 2019 ensures that the meta files are created

if [[ "$UNITY_UPM_VERSION" != *"2019"* ]]; then
echo "ERROR: UNITY_UPM_VERSION must be a version of Unity 2019. See script comments for details."
exit 1
fi

UNITY_PATH="/Applications/Unity/Hub/Editor/$UNITY_UPM_VERSION/Unity.app/Contents/MacOS"



Expand Down