Skip to content

Commit

Permalink
[MOBILE-4122] Release 9.2.1 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyaganeh authored Feb 6, 2024
1 parent 9285a52 commit 6da9c43
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Build
- name: Build project
env:
UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_USERNAME: ${{ secrets.ULRICH_UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.ULRICH_UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.ULRICH_UNITY_SERIAL }}
run: ./scripts/docker_run.sh
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- name: Build
env:
UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_USERNAME: ${{ secrets.ULRICH_UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.ULRICH_UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.ULRICH_UNITY_SERIAL }}
run: ./scripts/docker_run.sh

- name: Create Github Release
Expand All @@ -60,10 +60,10 @@ jobs:
asset_name: urbanairship-${{ steps.get_version.outputs.VERSION }}.unitypackage
asset_content_type: application/octet-stream

- name: Bintray Release
env:
BINTRAY_AUTH: ${{ secrets.BINTRAY_AUTH }}
run: bash ./scripts/deploy_bintray.sh ${{ steps.get_version.outputs.VERSION }}
# - name: Bintray Release
# env:
# BINTRAY_AUTH: ${{ secrets.BINTRAY_AUTH }}
# run: bash ./scripts/deploy_bintray.sh ${{ steps.get_version.outputs.VERSION }}

docs:
runs-on: ubuntu-latest
Expand Down
19 changes: 10 additions & 9 deletions Assets/UrbanAirship/Platforms/AttributeEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

using System;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
Expand Down Expand Up @@ -42,7 +43,7 @@ public AttributeEditor SetAttribute (string key, int value) {
if (IsInvalidField (key)) {
return this;
}
operations.Add (new AttributeMutation (AttributeAction.Set, key, value, AttributeType.Integer));
operations.Add (new AttributeMutation (AttributeAction.Set, key, value.ToString(CultureInfo.InvariantCulture), AttributeType.Integer));
return this;
}

Expand All @@ -56,7 +57,7 @@ public AttributeEditor SetAttribute (string key, long value) {
if (IsInvalidField (key)) {
return this;
}
operations.Add (new AttributeMutation (AttributeAction.Set, key, value, AttributeType.Long));
operations.Add (new AttributeMutation (AttributeAction.Set, key, value.ToString(CultureInfo.InvariantCulture), AttributeType.Long));
return this;
}

Expand All @@ -73,7 +74,7 @@ public AttributeEditor SetAttribute (string key, float value) {
if (float.IsNaN (value) || float.IsInfinity (value)) {
throw new FormatException ("Infinity or NaN: " + value);
}
operations.Add (new AttributeMutation (AttributeAction.Set, key, value, AttributeType.Float));
operations.Add (new AttributeMutation (AttributeAction.Set, key, value.ToString(CultureInfo.InvariantCulture), AttributeType.Float));
return this;
}

Expand All @@ -90,7 +91,7 @@ public AttributeEditor SetAttribute (string key, double value) {
if (double.IsNaN (value) || double.IsInfinity (value)) {
throw new FormatException ("Infinity or NaN: " + value);
}
operations.Add (new AttributeMutation (AttributeAction.Set, key, value, AttributeType.Double));
operations.Add (new AttributeMutation (AttributeAction.Set, key, value.ToString(CultureInfo.InvariantCulture), AttributeType.Double));
return this;
}

Expand All @@ -109,7 +110,7 @@ public AttributeEditor SetAttribute(string key, DateTime value)

// Pass date to the plugin as seconds since the epoch
System.DateTime epochStart = new System.DateTime(1970, 1, 1, 0, 0, 0, System.DateTimeKind.Utc);
double valueInMillisecondsSinceEpoch = (value - epochStart).TotalMilliseconds;
string valueInMillisecondsSinceEpoch = (value - epochStart).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);

operations.Add(new AttributeMutation(AttributeAction.Set, key, valueInMillisecondsSinceEpoch, AttributeType.Date));
return this;
Expand Down Expand Up @@ -185,11 +186,11 @@ internal class AttributeMutation {
private string type;
#pragma warning restore

public AttributeMutation (AttributeAction action, string key, object value, AttributeType type) {
this.action = action.ToString ();
public AttributeMutation (AttributeAction action, string key, string value, AttributeType type) {
this.action = action.ToString();
this.key = key;
this.value = value == null ? null : value.ToString ();
this.type = type.ToString ();
this.value = value;
this.type = type.ToString();
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions Assets/UrbanAirship/Platforms/CustomEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using UnityEngine;

Expand Down Expand Up @@ -51,8 +52,8 @@ public string EventName {
/// </summary>
/// <value>The event value.</value>
public decimal EventValue {
get { return Decimal.Parse (eventValue); }
set { eventValue = value.ToString (); }
get { return Decimal.Parse(eventValue, CultureInfo.InvariantCulture); }
set { eventValue = value.ToString(CultureInfo.InvariantCulture); }
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Unity Plugin ChangeLog

## Version 9.2.1 - February 5, 2024

Patch release that fixes an issue with decimal attribute values on certain locales. Apps that make use of attributes with decimal values should update.

### Changes
- Fixed decimal attribute values for locales that use a comma as the decimal separator.

## Version 9.2.0 - September 15, 2022

Minor release that updates to the latest SDK versions.
Expand Down
2 changes: 1 addition & 1 deletion airship.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Plugin version
version = 9.2.0
version = 9.2.1

# Urban Airship iOS SDK version
iosAirshipVersion = 16.9.3
Expand Down

0 comments on commit 6da9c43

Please sign in to comment.