Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php14
2 files changed, 12 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1275ca901..b109cee2e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
### Breaking Changes
* The method `Dimension::getId()` has been set as `final`. It is not allowed to overwrite this method.
+### Internal Change
+* The option `branch` of the console command `development:sync-system-test-processed` was removed as it is no longer needed.
+
## Piwik 2.14.0
### Breaking Changes
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
index f2f0bddf74..367cee78f1 100644
--- a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
+++ b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\CoreConsole\Commands;
+use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Decompress\Tar;
use Piwik\Development;
@@ -32,21 +33,24 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand
{
$this->setName('development:sync-system-test-processed');
$this->setDescription('For Piwik core devs. Copies processed system tests from travis artifacts to ' . $this->targetDir);
- $this->addOption('branch', null, InputOption::VALUE_REQUIRED, 'The branch the tests were running on', 'master');
- $this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync.');
+ $this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync, eg "14820".');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
- $branch = $input->getOption('branch');
$buildNumber = $input->getArgument('buildnumber');
$targetDir = PIWIK_INCLUDE_PATH . '/' . dirname($this->targetDir);
$tmpDir = StaticContainer::get('path.tmp');
$this->validate($buildNumber, $targetDir, $tmpDir);
- $filename = sprintf('processed.%s.tar.bz2', $buildNumber);
- $urlBase = sprintf('http://builds-artifacts.piwik.org/%s/%s/%s', $branch, $buildNumber, $filename);
+ if (Common::stringEndsWith($buildNumber, '.1')) {
+ // eg make '14820.1' to '14820' to be backwards compatible
+ $buildNumber = substr($buildNumber, 0, -2);
+ }
+
+ $filename = sprintf('system.%s.tar.bz2', $buildNumber);
+ $urlBase = sprintf('http://builds-artifacts.piwik.org/piwik/piwik/%s', $filename);
$tests = Http::sendHttpRequest($urlBase, $timeout = 120);
$tarFile = $tmpDir . $filename;