diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-12-05 23:46:20 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-12-06 11:22:00 +0100 |
commit | 5fd960b37017555656090ed8cac588100c962a2c (patch) | |
tree | dd436debeadcf204ffcb677cb12297da6fbd15d6 | |
parent | fcb7a1e4588de6f88af91e4f40ccff581f73da17 (diff) | |
download | nextcloud-server-5fd960b37017555656090ed8cac588100c962a2c.tar.gz nextcloud-server-5fd960b37017555656090ed8cac588100c962a2c.zip |
Document updater channel & check for correct PHP version in updater
* see https://github.com/nextcloud/updater/issues/53
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | config/config.sample.php | 11 | ||||
-rw-r--r-- | lib/private/Updater/VersionCheck.php | 3 | ||||
-rw-r--r-- | tests/lib/Updater/VersionCheckTest.php | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 82246e139c1..43a0ee6034b 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -522,6 +522,17 @@ $CONFIG = array( 'updater.server.url' => 'https://updates.nextcloud.com/updater_server/', /** + * The channel that Nextcloud should use to look for updates + * + * Supported values: + * - ``daily`` + * - ``beta` + * - ``stable`` + * - ``production`` + */ +'updater.release.channel' => 'stable', + +/** * Is Nextcloud connected to the Internet or running in a closed network? */ 'has_internet_connection' => true, diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index e745d5fc4c2..5b54c8e38e1 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -73,6 +73,9 @@ class VersionCheck { $version['updatechannel'] = \OC_Util::getChannel(); $version['edition'] = \OC_Util::getEditionString(); $version['build'] = \OC_Util::getBuild(); + $version['php_major'] = PHP_MAJOR_VERSION; + $version['php_minor'] = PHP_MINOR_VERSION; + $version['php_release'] = PHP_RELEASE_VERSION; $versionString = implode('x', $version); //fetch xml data from updater diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index f025cc02b02..79ef6dddcf9 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -50,7 +50,7 @@ class VersionCheckTest extends \Test\TestCase { * @return string */ private function buildUpdateUrl($baseUrl) { - return $baseUrl . '?version='.implode('x', Util::getVersion()).'xinstalledatxlastupdatedatx'.\OC_Util::getChannel().'x'.\OC_Util::getEditionString().'x'; + return $baseUrl . '?version='.implode('x', Util::getVersion()).'xinstalledatxlastupdatedatx'.\OC_Util::getChannel().'x'.\OC_Util::getEditionString().'xx'.PHP_MAJOR_VERSION.'x'.PHP_MINOR_VERSION.'x'.PHP_RELEASE_VERSION; } public function testCheckInCache() { |