1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Add hidden feature to pack.php to return version info as JSON

This will be useful for a development version badge.
This commit is contained in:
Starbeamrainbowlabs 2019-08-28 23:55:45 +01:00
parent d19c8712db
commit 53dd5e3d70
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -1,5 +1,13 @@
<?php <?php
if(isset($_GET["determine-latest-version"])) {
header("content-type: application/json");
exit(json_encode([
"latest_version" => trim(file_get_contents("https://raw.githubusercontent.com/sbrl/Pepperminty-Wiki/master/version")),
"local_version" => trim(file_get_contents("version"))
]));
}
/** /**
* Logs a string to stdout, but only on the CLI. * Logs a string to stdout, but only on the CLI.
* @param string $line The line to log. * @param string $line The line to log.