Merge pull request #236 from nextcloud/enh/exclude-rnd-files

Exclude .rnd files
This commit is contained in:
Morris Jobke 2019-07-22 12:13:22 +02:00 committed by GitHub
commit 96234eb99d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 4 deletions

View File

@ -40,6 +40,7 @@ class RecursiveDirectoryIteratorWithoutData extends \RecursiveFilterIterator {
public function accept() {
/** @var \DirectoryIterator $this */
$excludes = [
'.rnd',
'.well-known',
'data',
'..',
@ -318,6 +319,7 @@ class Updater {
'themes',
'updater',
// Files
'.rnd',
'index.html',
'indie.json',
'.user.ini',
@ -461,6 +463,7 @@ class Updater {
$this->silentLog('[info] createBackup()');
$excludedElements = [
'.rnd',
'.well-known',
'data',
];

View File

@ -26,6 +26,7 @@ class RecursiveDirectoryIteratorWithoutData extends \RecursiveFilterIterator {
public function accept() {
/** @var \DirectoryIterator $this */
$excludes = [
'.rnd',
'.well-known',
'data',
'..',

View File

@ -202,6 +202,7 @@ class Updater {
'themes',
'updater',
// Files
'.rnd',
'index.html',
'indie.json',
'.user.ini',
@ -345,6 +346,7 @@ class Updater {
$this->silentLog('[info] createBackup()');
$excludedElements = [
'.rnd',
'.well-known',
'data',
];

View File

@ -249,6 +249,12 @@ WbRmf4trGwDdCA/kQ59LInfLR8KFfEiiOH2p2NijgXuWm49tdr7N1062diP4Dzwd
WlWfRoT8G5DDQPGdj5a72+sQLjf3ZhjqgeQbGLwht/NonWLZhmmW/NgmylbCb9Ob
a7NE4Vf792DrmBvq4HCHUexg+upaJ0s4sJLGqg3sWF8iUEnLyGePyL/Bw6MeLvjD
sSD0Xb5oawIjTVHVAuL+3Q==',
'15.0.10' => '1FcyXT8cgPMctfn+S5QLGbPrkeXEWyaIGh1T9mP7BHaF5AHamuAGDzk04FKHYB/e
OylmXzDBE2w1LG5AOABAw3idwIJpfvH2dyi8tsBNdcGKY01DmMYEzn4y5i2r5Duv
lRjhRfuk/MrjUOH1XkGO1xPI8zXp8eI7Y53jHswbUayJGszzgCKcuC6z+QEUkf7v
p15duG8nbbF1c3CAh/dVsJ2AKKpcnLYJPC8UgGDXMtalSoPUv9QTWPrS7AqQRsVD
7xJThvWdx3aSV3aKREBzw5ddHUAIEENQ0aBdabgAXbBZEfLrMMG2XaHtdXGLpQs8
ypwcWVvLfYk9e+YEMdhMNg==',
'16.0.3' => 'TYiUB/+l2uXNpiHGuMhchHzzyMn8eiL2mzBD+fmwqUXU29UYK4FFvTbDEWWXxXF9
XeOXXBTkWltQ6A5K+nwFx4Phf4VPznaGn3U/1hsLSLBy9p9qqBMQdmDvCxl4dJmP
R0Ttz6sGcC1AsYwW2Q5Z1lywpmk1Ax5YcJesbjOFTU9HXIOI2s9YyPX4bP3L1rkH
@ -382,8 +388,6 @@ b813iKq4+cn3CjTunREm6A==',
require $this->serverDir . 'nextcloud/version.php';
$installedVersion = join('.', $OC_Version);
// Hack for version number mapping
$installedVersion = str_replace(['9.1', '9.2'], ['10.0', '11.0'], $installedVersion);
if (strpos($installedVersion, $version) !== 0) {
throw new Exception('Version mismatch - Installed: ' . $installedVersion . ' Wanted: ' . $version);

View File

@ -1,4 +1,4 @@
Feature: CLI updater - stable14 base
Feature: CLI updater - stable15 base
Scenario: Update is available - 15.0.0 beta 1 to 15.0.0 RC 1
Given the current installed version is 15.0.0beta1
@ -10,6 +10,37 @@ Feature: CLI updater - stable14 base
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available but unexpected folder found - 15.0.9 to 15.0.10
Given the current installed version is 15.0.9
And there is an update to version 15.0.10 available
And there is a folder called "test123"
When the CLI updater is run
Then the return code should not be 0
And the output should contain "The following extra files have been found"
Then the installed version should be 15.0.9
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available and .well-known folder exist - 15.0.9 to 15.0.10
Given the current installed version is 15.0.9
And there is an update to version 15.0.10 available
And there is a folder called ".well-known"
When the CLI updater is run successfully
And the output should contain "Update successful"
Then the installed version should be 15.0.10
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available and .rnd file exist - 15.0.9 to 15.0.10
Given the current installed version is 15.0.9
And there is an update to version 15.0.10 available
And there is a folder called ".rnd"
When the CLI updater is run successfully
And the output should contain "Update successful"
Then the installed version should be 15.0.10
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available - 15.0.0 to master daily
Given the current installed version is 15.0.0RC1
And PHP is at least in version 7.0

View File

@ -1,4 +1,4 @@
Feature: CLI updater - stable14 base
Feature: CLI updater - stable16 base
Scenario: Update is available - 16.0.1 to 16.0.3
Given the current installed version is 16.0.0

Binary file not shown.