File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed
Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,20 @@ public class ReleaseInfo
3333 [ ContextMenu ( "Generate Releases" ) ]
3434 public void LoadChangeLog ( )
3535 {
36- if ( cooldown )
37- return ;
38- cooldown = true ;
39-
4036 async Task AwaitCooldown ( )
4137 {
4238 await Task . Delay ( 10000 ) ;
4339 cooldown = false ;
4440 }
45- AwaitCooldown ( ) ;
4641
4742 async Task PopulateReleases ( )
4843 {
44+ if ( cooldown )
45+ {
46+ await AwaitCooldown ( ) ;
47+ }
48+ cooldown = true ;
49+
4950 UnityWebRequest www = UnityWebRequest . Get ( "https://api.github.com/repos/QuestCraftPlusPlus/Questcraft/releases" ) ;
5051 www . SetRequestHeader ( "User-Agent" , "QuestCraftPlusPlus/QuestCraft/" + Application . version + " (discord.gg/questcraft)" ) ;
5152 www . SendWebRequest ( ) ;
@@ -62,13 +63,15 @@ async Task PopulateReleases()
6263
6364 versionChecker . currentPublicVersion = _releases [ 0 ] . tag_name ;
6465 versionChecker . CheckVersion ( ) ;
65-
66+
6667 foreach ( var release in _releases )
68+ {
6769 changelogs +=
6870 $ "<size=75%>{ release . published_at . Split ( 'T' ) [ 0 ] } </size>\n " +
6971 $ "<size=120%><u>{ release . name } </u></size>" +
7072 $ "<line-height=10>\n </line-height>\n " +
7173 $ "{ release . body } \n \n \n \n ";
74+ }
7275
7376 tags . text = changelogs ;
7477 }
Original file line number Diff line number Diff line change @@ -18,7 +18,15 @@ public void Start()
1818
1919 public void CheckVersion ( )
2020 {
21- Debug . Log ( $ "Comparing Current version: { currentVersion } with Latest:{ currentPublicVersion } ") ;
21+ Debug . Log ( $ "Comparing Current version: { currentVersion } with Latest: { currentPublicVersion } ") ;
22+
23+ if ( ! Version . TryParse ( currentVersion , out var unused1 ) ||
24+ ! Version . TryParse ( currentPublicVersion , out var unused2 ) )
25+ {
26+ Debug . Log ( "Couldn't parse one or both versions, assuming latest." ) ;
27+ return ;
28+ }
29+
2230 if ( Version . Parse ( currentVersion ) >= Version . Parse ( currentPublicVersion ) )
2331 {
2432 Debug . Log ( "Up to date." ) ;
Original file line number Diff line number Diff line change 55 "com.unity.2d.sprite" : " 1.0.0" ,
66 "com.unity.collab-proxy" : " 2.3.1" ,
77 "com.unity.feature.development" : " 1.0.1" ,
8- "com.unity.ide.rider" : " 3.0.31 " ,
8+ "com.unity.ide.rider" : " 3.0.34 " ,
99 "com.unity.ide.visualstudio" : " 2.0.22" ,
1010 "com.unity.ide.vscode" : " 1.2.5" ,
1111 "com.unity.test-framework" : " 1.1.33" ,
You can’t perform that action at this time.
0 commit comments