added version.json, $version variable via version.php

This commit is contained in:
Matthias Kalb 2019-01-23 15:43:17 +01:00
parent 0dfe45acab
commit 6afac228f7
3 changed files with 13 additions and 21 deletions

View file

@ -13,6 +13,8 @@
if($_GET["site"]!="error"){ if($_GET["site"]!="error"){
include $_SESSION["docroot"].'/php/auth.php'; include $_SESSION["docroot"].'/php/auth.php';
} }
include $_SESSION["docroot"].'/version.php';
?> ?>
<html lang="de" dir="ltr"> <html lang="de" dir="ltr">
<head> <head>

5
version.json Normal file
View file

@ -0,0 +1,5 @@
{
"version": "0.2.4",
"version_suffix": "alpha",
"update_channel": "dev"
}

View file

@ -1,24 +1,9 @@
<?php <?php
// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades $version = json_decode(file_get_contents("version.json"), true);
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // This gives:
// when updating major/minor version number. // - $version['version']
// - $version['version_suffix']
// - $version['update_channel']
$SL_Version = array(0, 2, 3, 1); ?>
// The human readable string
$SL_VersionString = '0.2.3 alpha';
$SL_VersionCanBeUpgradedFrom = [
'shopping-list' => [
'0.1.0' => true,
'0.2.0' => true,
'0.2.1' => true,
],
];
// default shopping-list channel
$SL_Channel = 'git';
// The build number
$SL_Build = '';