Use 'dev' version on the master branch
Allowed check branches are now `latest` and `stable`.
This commit is contained in:
parent
7fc5f07492
commit
b897c81f8c
4 changed files with 19 additions and 11 deletions
|
@ -5,7 +5,7 @@
|
||||||
class ApplicationUtils
|
class ApplicationUtils
|
||||||
{
|
{
|
||||||
private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli';
|
private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli';
|
||||||
private static $GIT_BRANCHES = array('master', 'stable');
|
private static $GIT_BRANCHES = array('latest', 'stable');
|
||||||
private static $VERSION_FILE = 'shaarli_version.php';
|
private static $VERSION_FILE = 'shaarli_version.php';
|
||||||
private static $VERSION_START_TAG = '<?php /* ';
|
private static $VERSION_START_TAG = '<?php /* ';
|
||||||
private static $VERSION_END_TAG = ' */ ?>';
|
private static $VERSION_END_TAG = ' */ ?>';
|
||||||
|
@ -65,13 +65,10 @@ public static function checkUpdate($currentVersion,
|
||||||
$isLoggedIn,
|
$isLoggedIn,
|
||||||
$branch='stable')
|
$branch='stable')
|
||||||
{
|
{
|
||||||
if (! $isLoggedIn) {
|
|
||||||
// Do not check versions for visitors
|
// Do not check versions for visitors
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($enableCheck)) {
|
|
||||||
// Do not check if the user doesn't want to
|
// Do not check if the user doesn't want to
|
||||||
|
// Do not check with dev version
|
||||||
|
if (! $isLoggedIn || empty($enableCheck) || $currentVersion === 'dev') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Shaarli v0.8.3 - Shaare your links...
|
* Shaarli dev - Shaare your links...
|
||||||
*
|
*
|
||||||
* The personal, minimalist, super-fast, database free, bookmarking service.
|
* The personal, minimalist, super-fast, database free, bookmarking service.
|
||||||
*
|
*
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
/*
|
/*
|
||||||
* PHP configuration
|
* PHP configuration
|
||||||
*/
|
*/
|
||||||
define('shaarli_version', '0.8.2');
|
define('shaarli_version', 'dev');
|
||||||
|
|
||||||
// http://server.com/x/shaarli --> /shaarli/
|
// http://server.com/x/shaarli --> /shaarli/
|
||||||
define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
|
define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<?php /* 0.8.3 */ ?>
|
<?php /* dev */ ?>
|
||||||
|
|
|
@ -332,4 +332,15 @@ public function testCheckCurrentResourcePermissionsErrors()
|
||||||
ApplicationUtils::checkResourcePermissions($conf)
|
ApplicationUtils::checkResourcePermissions($conf)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check update with 'dev' as curent version (master branch).
|
||||||
|
* It should always return false.
|
||||||
|
*/
|
||||||
|
public function testCheckUpdateDev()
|
||||||
|
{
|
||||||
|
$this->assertFalse(
|
||||||
|
ApplicationUtils::checkUpdate('dev', self::$testUpdateFile, 100, true, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue