Skip to content

Commit 30a6021

Browse files
authored
Merge pull request #1920 from alttester/1918-update-version-to-230
Update location and version
2 parents 52242f2 + 7de816a commit 30a6021

File tree

19 files changed

+35
-36
lines changed

19 files changed

+35
-36
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ assignees: ''
1414
(2019.4.40f1, 2020.3.31f1, 2020.3.40f1, 2021.3.2f1, 2021.3.11f1, etc)
1515

1616
**What version of AltTester® Unity SDK are you using?**
17-
(1.6.6, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.2, 2.2.4, 2.2.5, 2.2.6, 2.2.7)
17+
(1.6.6, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.2, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.3.0)
1818

1919
**On what device are you trying to run the test?**
2020
(Android, iOS)

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
run: |
110110
cd "Bindings~/dotnet"
111111
dotnet pack AltDriver/AltDriver.csproj -c release
112-
dotnet nuget push AltDriver/bin/release/AltTester-Driver.2.2.7.nupkg --api-key $NUGET_DEPLOY_KEY --source https://api.nuget.org/v3/index.json
112+
dotnet nuget push AltDriver/bin/release/AltTester-Driver.2.3.0.nupkg --api-key $NUGET_DEPLOY_KEY --source https://api.nuget.org/v3/index.json
113113
114114
create-unity-package:
115115
runs-on: [self-hosted, MAC37]

.github/workflows/upload-package-to-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
1919
if [[ "$GITHUB_REF" == refs/heads/* ]]; then
2020
COMMIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
21-
VERSION="2.2.7-$COMMIT_HASH"
21+
VERSION="2.3.0-$COMMIT_HASH"
2222
sed -i '' "s/public static readonly string VERSION = \".*\";/public static readonly string VERSION = \"$VERSION\";/" Assets/AltTester/Runtime/Commands/AltRunner.cs
2323
sed -i '' "s/\"version\": \".*\";/\"version\": \"$VERSION\";/" Assets/AltTester/package.json
2424
fi

Assets/AltTester/Runtime/AltDriver/AltDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class AltDriver
3535
private static readonly NLog.Logger logger = DriverLogManager.Instance.GetCurrentClassLogger();
3636
private readonly IDriverCommunication communicationHandler;
3737
private static object driverLock = new object();
38-
public static readonly string VERSION = "2.2.7";
38+
public static readonly string VERSION = "2.3.0";
3939

4040
public IDriverCommunication CommunicationHandler { get { return communicationHandler; } }
4141

Assets/AltTester/Runtime/Commands/AltRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class AltRunner : UnityEngine.MonoBehaviour
3030
{
3131
private static readonly NLog.Logger logger = ServerLogManager.Instance.GetCurrentClassLogger();
3232

33-
public static readonly string VERSION = "2.2.7";
33+
public static readonly string VERSION = "2.3.0";
3434
public static AltRunner _altRunner;
3535
public static AltResponseQueue _responseQueue;
3636
public AltInstrumentationSettings InstrumentationSettings = null;

Assets/AltTester/Runtime/UI/AltDialog.cs

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ You should have received a copy of the GNU General Public License
2929
using System.Text.RegularExpressions;
3030
using UnityEngine.Networking;
3131
using UnityEngine.UI;
32+
using Newtonsoft.Json.Linq;
33+
3234

3335

3436

@@ -724,33 +726,28 @@ private void onDriverDisconnect(string driverId)
724726
private IEnumerator getRequest()
725727
{
726728

727-
using (UnityWebRequest request = UnityWebRequest.Get("https://alttester.com/alttester-desktop-versions/"))
729+
using (UnityWebRequest request = UnityWebRequest.Get("https://alttester.com/app/uploads/AltTester/sdks/alttester/latest_version.json"))
728730
{
729731
yield return request.SendWebRequest();
730732
if (request.result != UnityWebRequest.Result.Success)
731733
{
732734
UnityEngine.Debug.Log("There was a problem with the request.");
733735
yield break;
734736
}
735-
736737
string textReceived = request.downloadHandler.text;
737-
Regex regex = new Regex(@"https://alttester.com/app/uploads/AltTester/sdks/AltTesterUnitySDK[\w\.]*.unitypackage");
738-
Match match = regex.Match(textReceived);
739-
if (match.Success)
738+
739+
JObject obj = JObject.Parse(textReceived);
740+
string version = obj["GPL"].ToString();
741+
downloadURL = obj["GPLURL"].ToString();
742+
if (isCurrentVersionOlderOrEqualThanRelease(version, AltRunner.VERSION.Split("-")[0]))
743+
{
744+
isNewVersionAvailable = false;
745+
UnityEngine.Debug.Log("There is no new version available to download");
746+
}
747+
else
740748
{
741-
downloadURL = match.Value;
742-
Match match2 = Regex.Match(match.Value, @"(\d+_\d+_\d+)\.unitypackage");
743-
var releasedVersion = match2.Groups[1].Value.Replace('_', '.');
744-
if (isCurrentVersionOlderOrEqualThanRelease(releasedVersion, AltRunner.VERSION.Split("-")[0]))
745-
{
746-
isNewVersionAvailable = false;
747-
UnityEngine.Debug.Log("There is no new version available to download");
748-
}
749-
else
750-
{
751-
isNewVersionAvailable = true;
752-
newVersionMessage = $"<size=26>Version <b>{releasedVersion}</b> is available to <b><color={colorCode}>download</color></b>.</size>";
753-
}
749+
isNewVersionAvailable = true;
750+
newVersionMessage = $"<size=26>Version <b>{version}</b> is available to <b><color={colorCode}>download</color></b>.</size>";
754751
}
755752
}
756753

Assets/AltTester/Runtime/UI/MessageClickHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public void OnPointerClick(PointerEventData eventData)
2727
camera,
2828
out localPoint
2929
);
30-
if (localPoint.y > 0 && dialog.StillDisplayingNewVersionMessage)
30+
if (!dialog.StillDisplayingNewVersionMessage)
31+
return;
32+
if (localPoint.y > 0)
3133
{
3234
dialog.DownloadNewVersion();
3335
}

Assets/AltTester/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.alttester.sdk",
3-
"version": "2.2.7",
3+
"version": "2.3.0",
44
"displayName": "AltTester Unity SDK",
55
"description": "AltTester Unity SDK is an open-source UI driven test automation tool that helps you find objects in your game and interacts with them using tests written in C#, Python, Java or Robot Framework.",
66
"unity": "2021.3",

Bindings~/dotnet/AltDriver/AltDriver.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
55
<RootNamespace>AltTester.AltTester-Driver</RootNamespace>
66
<IsPackable>true</IsPackable>
7-
<PackageVersion Condition="'$(PACKAGE_VERSION)' == ''">2.2.7</PackageVersion>
7+
<PackageVersion Condition="'$(PACKAGE_VERSION)' == ''">2.3.0</PackageVersion>
88
<PackageVersion Condition="'$(PACKAGE_VERSION)' != ''">$(PACKAGE_VERSION)</PackageVersion>
99
<Title>AltTester-Driver</Title>
1010
<Description>

Bindings~/java/pom-release.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.alttester</groupId>
77
<artifactId>alttester</artifactId>
88
<packaging>jar</packaging>
9-
<version>2.2.7</version>
9+
<version>2.3.0</version>
1010

1111
<name>AltTester-Driver</name>
1212
<description>An automated tool for testing Unity Games</description>

0 commit comments

Comments
 (0)