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:
parent
d19c8712db
commit
53dd5e3d70
1 changed files with 8 additions and 0 deletions
8
pack.php
8
pack.php
|
@ -1,5 +1,13 @@
|
|||
<?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.
|
||||
* @param string $line The line to log.
|
||||
|
|
Loading…
Reference in a new issue