json(self::latest()); } /** * The latest version and its download URL; also used by the static Android app page. * scripts/deploy-apk.sh rewrites the two version lines below. */ public static function latest(): array { $versionCode = 6; $versionName = '1.0.4'; $apkFile = str_replace('{version}', $versionName, timebank_config('android_app.apk_file', 'timebank-cc-{version}.apk')); return [ 'versionCode' => $versionCode, 'versionName' => $versionName, 'apkUrl' => url("storage/apk/{$apkFile}"), ]; } }