diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-07-22 13:13:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-22 13:13:22 +0300 |
commit | 96234eb99dd5b887350e63d1b0815a978395bf65 (patch) | |
tree | 491305a35732ef42dce022ae585e5cc5825253e6 | |
parent | b0891124389617d4e2c7fd7c03ad8041cc836cc0 (diff) | |
parent | 5c538f05440e07977f0cfab49bec7733450e4888 (diff) |
Merge pull request #236 from nextcloud/enh/exclude-rnd-filesv19.0.0beta7v19.0.0beta6v19.0.0beta5v19.0.0beta4v19.0.0beta3v19.0.0beta2v19.0.0beta1v19.0.0RC3v19.0.0RC2v19.0.0RC1v19.0.0v18.0.7RC1v18.0.7v18.0.6v18.0.5v18.0.4RC2v18.0.4RC1v18.0.4v18.0.2RC2v18.0.2RC1v18.0.2v18.0.1RC3v18.0.1RC2v18.0.1RC1v18.0.1v18.0.0beta4v18.0.0beta3v18.0.0beta2v18.0.0beta1v18.0.0RC2v18.0.0RC1v18.0.0v17.0.8RC1v17.0.8v17.0.7RC1v17.0.7v17.0.6RC2v17.0.6RC1v17.0.6v17.0.5RC1v17.0.4RC2v17.0.4RC1v17.0.4v17.0.3RC1v17.0.3v17.0.2RC1v17.0.2v17.0.1rc1v17.0.1v17.0.0rc2v17.0.0rc1v17.0.0beta4v17.0.0beta3v17.0.0beta2v17.0.0beta1v17.0.0
Exclude .rnd files
-rw-r--r-- | index.php | 3 | ||||
-rw-r--r-- | lib/RecursiveDirectoryIteratorWithoutData.php | 1 | ||||
-rw-r--r-- | lib/Updater.php | 2 | ||||
-rw-r--r-- | tests/features/bootstrap/FeatureContext.php | 8 | ||||
-rw-r--r-- | tests/features/stable15.feature | 33 | ||||
-rw-r--r-- | tests/features/stable16.feature | 2 | ||||
-rwxr-xr-x | updater.phar | bin | 599747 -> 599781 bytes |
7 files changed, 45 insertions, 4 deletions
@@ -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', ]; diff --git a/lib/RecursiveDirectoryIteratorWithoutData.php b/lib/RecursiveDirectoryIteratorWithoutData.php index 3b9ae76..13f0a40 100644 --- a/lib/RecursiveDirectoryIteratorWithoutData.php +++ b/lib/RecursiveDirectoryIteratorWithoutData.php @@ -26,6 +26,7 @@ class RecursiveDirectoryIteratorWithoutData extends \RecursiveFilterIterator { public function accept() { /** @var \DirectoryIterator $this */ $excludes = [ + '.rnd', '.well-known', 'data', '..', diff --git a/lib/Updater.php b/lib/Updater.php index d730e16..0434d87 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -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', ]; diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php index 31bfac4..722e3b6 100644 --- a/tests/features/bootstrap/FeatureContext.php +++ b/tests/features/bootstrap/FeatureContext.php @@ -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); diff --git a/tests/features/stable15.feature b/tests/features/stable15.feature index 202d6ed..1b4ba20 100644 --- a/tests/features/stable15.feature +++ b/tests/features/stable15.feature @@ -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 diff --git a/tests/features/stable16.feature b/tests/features/stable16.feature index f153da6..5ed5e8e 100644 --- a/tests/features/stable16.feature +++ b/tests/features/stable16.feature @@ -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 diff --git a/updater.phar b/updater.phar Binary files differindex 42f9cf8..d89ee4b 100755 --- a/updater.phar +++ b/updater.phar |