Skip to content

Commit

Permalink
Merge pull request #32000 from owncloud/stable10-installed-version
Browse files Browse the repository at this point in the history
[stable10] Store installed at version
  • Loading branch information
DeepDiver1975 authored Jul 18, 2018
2 parents 31cecde + 666ba5f commit 55d81e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/Command/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ protected function configure() {
protected function execute(InputInterface $input, OutputInterface $output) {
$values = [
'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
'version' => implode('.', \OCP\Util::getVersion()),
'first_install_version' => \OC::$server->getConfig()->getAppValue('core', 'first_install_version', 'unknown'),
'version' => \implode('.', \OCP\Util::getVersion()),
'versionstring' => \OC_Util::getVersionString(),
'edition' => \OC_Util::getEditionString(),
];
Expand Down
3 changes: 3 additions & 0 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ public function install($options) {

self::installBackgroundJobs();

// save the origin version that we installed at
$config->setAppValue('core', 'first_install_version', \implode('.', \OCP\Util::getVersion()));

//and we are done
$config->setSystemValue('installed', true);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/bootstrap/BasicStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,11 @@ public function statusPhpRespondedShouldMatch(PyStringNode $jsonExpected) {
= \json_encode(\json_decode($this->response->getBody(), true));
if ($this->runOcc(['status']) === 0) {
$output = \explode("- ", $this->lastStdOut);
$version = \explode(": ", $output[2]);
$version = \explode(": ", $output[3]);
PHPUnit_Framework_Assert::assertEquals(
"version", $version[0]
);
$versionString = \explode(": ", $output[3]);
$versionString = \explode(": ", $output[4]);
PHPUnit_Framework_Assert::assertEquals(
"versionstring", $versionString[0]
);
Expand Down

0 comments on commit 55d81e6

Please sign in to comment.