com.amanotes.gdk 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
- package/Runtime/AmaGDK.Internal.SemVer.cs +13 -7
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
3
|
using System.Text.RegularExpressions;
|
|
4
|
+
using static Amanotes.Core.Internal.Logging;
|
|
4
5
|
|
|
5
6
|
namespace Amanotes.Core.Internal
|
|
6
7
|
{
|
|
7
8
|
public struct SemVer : IComparable<SemVer>, IComparer<SemVer>
|
|
8
9
|
{
|
|
9
|
-
public static readonly SemVer ZERO = new SemVer(0,0,0);
|
|
10
|
+
public static readonly SemVer ZERO = new SemVer(0, 0, 0);
|
|
10
11
|
|
|
11
12
|
public int major;
|
|
12
13
|
public int minor;
|
|
@@ -21,25 +22,30 @@ namespace Amanotes.Core.Internal
|
|
|
21
22
|
|
|
22
23
|
public SemVer(string version)
|
|
23
24
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
major = 0;
|
|
26
|
+
minor = 0;
|
|
27
|
+
patch = 0;
|
|
28
|
+
|
|
29
|
+
if (string.IsNullOrEmpty(version))
|
|
30
|
+
{
|
|
28
31
|
return;
|
|
29
32
|
}
|
|
30
33
|
|
|
34
|
+
version = version.Trim();
|
|
35
|
+
|
|
31
36
|
Regex regex = new Regex(@"^(\d+)\.(\d+)\.(\d+)$");
|
|
32
37
|
Match match = regex.Match(version);
|
|
33
38
|
if (!match.Success)
|
|
34
39
|
{
|
|
35
|
-
|
|
40
|
+
LogWarning($"Invalid SemVer string: [{version}]");
|
|
41
|
+
return;
|
|
36
42
|
}
|
|
37
43
|
major = int.Parse(match.Groups[1].Value);
|
|
38
44
|
minor = int.Parse(match.Groups[2].Value);
|
|
39
45
|
patch = int.Parse(match.Groups[3].Value);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
public bool isValid { get { return this != ZERO; }}
|
|
48
|
+
public bool isValid { get { return this != ZERO; } }
|
|
43
49
|
|
|
44
50
|
public override string ToString()
|
|
45
51
|
{
|
package/Runtime/AmaGDK.cs
CHANGED