[Scummvm-git-logs] scummvm-web master -> 3da67ae86b791034e3b227c94a9adbc590e40e0b

lotharsm mail at serra.me
Tue Mar 10 10:03:52 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
3da67ae86b WEB: Add version constants for Android and Snap Store releases


Commit: 3da67ae86b791034e3b227c94a9adbc590e40e0b
    https://github.com/scummvm/scummvm-web/commit/3da67ae86b791034e3b227c94a9adbc590e40e0b
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-03-10T10:00:31Z

Commit Message:
WEB: Add version constants for Android and Snap Store releases

Since we can't use the filenames for stripping out the version information,
we have to rely on set values in Constants.php like we do for the Debian
and Tools packages.

Fixes empty version string for the recommended downloads offered
for Android users.

Changed paths:
    include/Constants.php
    include/Models/DownloadsModel.php


diff --git a/include/Constants.php b/include/Constants.php
index 671d6b2a..670bdbd9 100644
--- a/include/Constants.php
+++ b/include/Constants.php
@@ -9,6 +9,8 @@ class Constants
         define('RELEASE', '2.1.1');
         define('RELEASE_TOOLS', '2.1.0');
         define('RELEASE_DEBIAN', '2.1.1');
+        define('RELEASE_SNAP_STORE', '2.1.1');
+        define('RELEASE_ANDROID_STORE', '2.0.0');
 
         /* Version when the percentages on the compat page were removed */
         define('COMPAT_LAYOUT_CHANGE', '1.7.0');
diff --git a/include/Models/DownloadsModel.php b/include/Models/DownloadsModel.php
index c54a7ae3..43a964ae 100644
--- a/include/Models/DownloadsModel.php
+++ b/include/Models/DownloadsModel.php
@@ -102,6 +102,19 @@ abstract class DownloadsModel
                         $extra_text = $data;
                     }
 
+                    /*
+                    Get the version information for our store releases for
+                    Android and the Snap store. Since we can't rely on the
+                    file names here, we set them via Constants.php
+                    */
+                    if ($os['name'] === 'Android') {
+                        $version = RELEASE_ANDROID_STORE;
+                    }
+
+                    if ($os['name'] === 'Ubuntu') {
+                        $version = RELEASE_SNAP_STORE;
+		            }
+
                     return array(
                     'os' => $name,
                     'ver' => $version,




More information about the Scummvm-git-logs mailing list