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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.13 - 2023-03-01]
4
+ ### Release AmaGDK v0.1.13
5
+ ### Fix Semver parser
6
+
3
7
  ## [0.1.12 - 2023-03-01]
4
8
  ### Release AmaGDK v0.1.12
5
9
  ### Prioritize analytics instant config over the base config
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
- if (string.IsNullOrEmpty(version)) {
25
- major = 0;
26
- minor = 0;
27
- patch = 0;
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
- throw new ArgumentException("Invalid SemVer string", "version");
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
@@ -12,7 +12,7 @@ namespace Amanotes.Core
12
12
  {
13
13
  public partial class AmaGDK : MonoBehaviour
14
14
  {
15
- public const string VERSION = "0.1.12";
15
+ public const string VERSION = "0.1.13";
16
16
 
17
17
  internal static AmaGDK _instance;
18
18
  internal static event Action _frameUpdate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",