Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2018-04-20 17:31:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Fri Apr 20 17:31:02 2018 rev:45 rq:598557 version:3.32.3 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2018-04-16 12:49:04.844912190 +0200 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2018-04-20 17:33:21.546077064 +0200 @@ -1,0 +2,16 @@ +Thu Apr 19 12:59:13 UTC 2018 - [email protected] + +- Update to version 3.32.3: + * Release v3.32.3 + * Correct fix for snapshot:restore and variable:delete bug 😳 + * [self:release] fix release download URL [skip changelog] + * Release v3.32.2 + * [self:release] Use temp dir for phar file [skip changelog] + * Fix invalid type bug that broke 2 commands: variable:delete and snapshot:restore + * [project:get] ... and check for all heads [skip changelog] + * [project:get] Fix check for repository existence (do not assume a default HEAD) + * Fix: allow more than one / in a GitLab project name (#708) + * [activity:log] show progress bar if possible + * [self:install] Detect ZSH more liberally when finding a config file + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.32.1.tar.xz New: ---- platformsh-cli-3.32.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.kI42Lr/_old 2018-04-20 17:33:22.842030067 +0200 +++ /var/tmp/diff_new_pack.kI42Lr/_new 2018-04-20 17:33:22.846029922 +0200 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.32.1 +Version: 3.32.3 Release: 0 Summary: Tool for managing Platform.sh services from the command line # See licenses.txt for dependency licenses. ++++++ _service ++++++ --- /var/tmp/diff_new_pack.kI42Lr/_old 2018-04-20 17:33:22.882028616 +0200 +++ /var/tmp/diff_new_pack.kI42Lr/_new 2018-04-20 17:33:22.882028616 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">refs/tags/v3.32.1</param> + <param name="revision">refs/tags/v3.32.3</param> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.kI42Lr/_old 2018-04-20 17:33:22.902027891 +0200 +++ /var/tmp/diff_new_pack.kI42Lr/_new 2018-04-20 17:33:22.910027601 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">a3568bf9fef843380a5266bcbba5e6063097a0fa</param> + <param name="changesrevision">6c3f2940691fd215d0edc36e6a0d2f75b4452a45</param> </service> </servicedata> ++++++ platformsh-cli-3.32.1.tar.xz -> platformsh-cli-3.32.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/config.yaml new/platformsh-cli-3.32.3/config.yaml --- old/platformsh-cli-3.32.1/config.yaml 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/config.yaml 2018-04-19 14:02:04.000000000 +0200 @@ -1,7 +1,7 @@ # Metadata about the CLI application itself. application: name: 'Platform.sh CLI' - version: '3.32.1' + version: '3.32.3' executable: 'platform' package_name: 'platformsh/cli' installer_url: 'https://platform.sh/cli/installer' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/dist/manifest.json new/platformsh-cli-3.32.3/dist/manifest.json --- old/platformsh-cli-3.32.1/dist/manifest.json 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/dist/manifest.json 2018-04-19 14:02:04.000000000 +0200 @@ -1,10 +1,10 @@ [ { "name": "platform.phar", - "sha1": "292a76da13dfa68578f28e0443c819fbadc1adf6", - "sha256": "e93014deab3686a432a2c9e510eeeca2c9b8532c24d0007eb9b2d84fccb12be5", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.32.1/platform.phar", - "version": "3.32.1", + "sha1": "36cf03f0834e3e24e4133401bbe8a8725cb76e69", + "sha256": "6c6cd56ccd77aaea2a8a2104e90348f2495485e1b7b23c822911a49b52ec10b5", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.32.3/platform.phar", + "version": "3.32.3", "php": { "min": "5.5.9" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Activity/ActivityLogCommand.php new/platformsh-cli-3.32.3/src/Command/Activity/ActivityLogCommand.php --- old/platformsh-cli-3.32.1/src/Command/Activity/ActivityLogCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Activity/ActivityLogCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -5,9 +5,11 @@ use Platformsh\Cli\Service\ActivityMonitor; use Platformsh\Cli\Service\PropertyFormatter; use Platformsh\Client\Model\Activity; +use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\OutputInterface; class ActivityLogCommand extends CommandBase @@ -85,20 +87,39 @@ $refresh = $input->getOption('refresh'); if ($refresh > 0 && !$this->runningViaMulti && !$activity->isComplete()) { + $progressOutput = $this->stdErr->isDecorated() ? $this->stdErr : new NullOutput(); + $bar = new ProgressBar($progressOutput); + $bar->setPlaceholderFormatterDefinition('state', function () use ($activity) { + return ActivityMonitor::formatState($activity->state); + }); + $bar->setFormat('[%bar%] %elapsed:6s% (%state%)'); + $bar->start(); + $activity->wait( - null, - function ($log) use ($output) { + function () use ($bar) { + $bar->advance(); + }, + function ($log) use ($output, $bar, $progressOutput) { + // Clear the progress bar and ensure the current line is flushed. + $bar->clear(); + $progressOutput->write($progressOutput->isDecorated() ? "\n\033[1A" : "\n"); + + // Display the new log output. $output->write($log); + + // Display the progress bar again. + $bar->advance(); }, $refresh ); + $bar->clear(); // Once the activity is complete, something has probably changed in // the project's environments, so this is a good opportunity to // clear the cache. $this->api()->clearEnvironmentsCache($activity->project); } else { - $output->write($activity->log); + $output->writeln($activity->log); } return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Integration/IntegrationCommandBase.php new/platformsh-cli-3.32.3/src/Command/Integration/IntegrationCommandBase.php --- old/platformsh-cli-3.32.1/src/Command/Integration/IntegrationCommandBase.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Integration/IntegrationCommandBase.php 2018-04-19 14:02:04.000000000 +0200 @@ -71,7 +71,7 @@ ]], 'description' => 'The GitLab project (e.g. \'namespace/repo\')', 'validator' => function ($string) { - return substr_count($string, '/', 1) === 1; + return strpos($string, '/', 1) !== false; }, ]), 'repository' => new Field('Repository', [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Project/ProjectGetCommand.php new/platformsh-cli-3.32.3/src/Command/Project/ProjectGetCommand.php --- old/platformsh-cli-3.32.1/src/Command/Project/ProjectGetCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Project/ProjectGetCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -56,7 +56,8 @@ // First check if the repo actually exists. try { - $repoExists = $git->remoteRepoExists($gitUrl); + $repoExists = $git->remoteRefExists($gitUrl, 'refs/heads/' . $environment->id) + || $git->remoteRefExists($gitUrl); } catch (\RuntimeException $e) { // The ls-remote command failed. $this->stdErr->writeln(sprintf( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Self/SelfInstallCommand.php new/platformsh-cli-3.32.3/src/Command/Self/SelfInstallCommand.php --- old/platformsh-cli-3.32.1/src/Command/Self/SelfInstallCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Self/SelfInstallCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -166,8 +166,7 @@ '.bash_profile', '.bashrc', ]; - $shell = str_replace('/bin/', '', getenv('SHELL')); - if ($shell === 'zsh') { + if (basename(getenv('SHELL')) === 'zsh' || getenv('ZSH')) { array_unshift($candidates, '.zshrc'); array_unshift($candidates, '.zprofile'); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Self/SelfReleaseCommand.php new/platformsh-cli-3.32.3/src/Command/Self/SelfReleaseCommand.php --- old/platformsh-cli-3.32.1/src/Command/Self/SelfReleaseCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Self/SelfReleaseCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -133,9 +133,10 @@ return 1; } if (!$pharFilename) { - $pharFilename = CLI_ROOT . '/' . $this->config()->get('application.executable') . '.phar'; + $pharFilename = sys_get_temp_dir() . '/' . $this->config()->get('application.executable') . '.phar'; $result = $this->runOtherCommand('self:build', [ '--output' => $pharFilename, + '--yes' => true, ]); if ($result !== 0) { $this->stdErr->writeln('The build failed'); @@ -228,7 +229,7 @@ // Construct the download URL (the public location of the Phar file). $download_url = str_replace('{tag}', $tagName, $this->config()->getWithDefault( - 'download_url', + 'application.download_url', 'https://github.com/' . $repoUrl . '/releases/download/{tag}/' . $pharPublicFilename )); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Snapshot/SnapshotRestoreCommand.php new/platformsh-cli-3.32.3/src/Command/Snapshot/SnapshotRestoreCommand.php --- old/platformsh-cli-3.32.1/src/Command/Snapshot/SnapshotRestoreCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Snapshot/SnapshotRestoreCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -62,7 +62,7 @@ $selectedActivity = reset($snapshotActivities); } - if (!$this->api()->checkEnvironmentOperation('restore', $selectedActivity)) { + if (!$selectedActivity->operationAvailable('restore')) { if (!$selectedActivity->isComplete()) { $this->stdErr->writeln("The snapshot is not complete, so it cannot be restored"); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Command/Variable/VariableDeleteCommand.php new/platformsh-cli-3.32.3/src/Command/Variable/VariableDeleteCommand.php --- old/platformsh-cli-3.32.1/src/Command/Variable/VariableDeleteCommand.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Command/Variable/VariableDeleteCommand.php 2018-04-19 14:02:04.000000000 +0200 @@ -36,7 +36,7 @@ return 1; } - if (!$this->api()->checkEnvironmentOperation('delete', $variable)) { + if (!$variable->operationAvailable('delete')) { if ($variable instanceof Variable && $variable->inherited) { $this->stdErr->writeln( "The variable <error>$variableName</error> is inherited," diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Service/Git.php new/platformsh-cli-3.32.3/src/Service/Git.php --- old/platformsh-cli-3.32.1/src/Service/Git.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Service/Git.php 2018-04-19 14:02:04.000000000 +0200 @@ -124,18 +124,18 @@ /** * Execute a Git command. * - * @param string[] $args + * @param string[] $args * Command arguments (everything after 'git'). * @param string|false|null $dir * The path to a Git repository. Set to false if the command should not * run inside a repository. Set to null to use the default repository. - * @param bool $mustRun + * @param bool $mustRun * Enable exceptions if the Git command fails. - * @param bool $quiet + * @param bool $quiet * Suppress command output. - * @param array $env + * @param array $env * - * @throws \Exception + * @throws \Symfony\Component\Process\Exception\RuntimeException * If the command fails and $mustRun is enabled. * * @return string|bool @@ -176,15 +176,24 @@ * Check whether a remote repository exists. * * @param string $url + * @param string $ref + * @param bool $heads Whether to limit to heads only. * - * @throws \Exception + * @throws \Symfony\Component\Process\Exception\RuntimeException * If the Git command fails. * * @return bool */ - public function remoteRepoExists($url) + public function remoteRefExists($url, $ref = null, $heads = true) { - $result = $this->execute(['ls-remote', $url, 'HEAD'], false, true); + $args = ['ls-remote', $url]; + if ($heads) { + $args[] = '--heads'; + } + if ($ref !== null) { + $args[] = $ref; + } + $result = $this->execute($args, false, true); return !is_bool($result) && strlen($result) > 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.32.1/src/Service/Shell.php new/platformsh-cli-3.32.3/src/Service/Shell.php --- old/platformsh-cli-3.32.1/src/Service/Shell.php 2018-04-13 00:22:29.000000000 +0200 +++ new/platformsh-cli-3.32.3/src/Service/Shell.php 2018-04-19 14:02:04.000000000 +0200 @@ -77,7 +77,7 @@ * @param array $env * @param int|null $timeout * - * @throws \Exception + * @throws \Symfony\Component\Process\Exception\RuntimeException * If $mustRun is enabled and the command fails. * * @return bool|string ++++++ platformsh-cli-vendor.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/autoload.php new/vendor/autoload.php --- old/vendor/autoload.php 2018-04-13 17:40:56.574179695 +0200 +++ new/vendor/autoload.php 2018-04-19 14:59:16.166391587 +0200 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit432d689a266ca93b0ad76cebcee4eb27::getLoader(); +return ComposerAutoloaderInita0c56a591185deffae88820ea5cc8e15::getLoader(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/composer/autoload_real.php new/vendor/composer/autoload_real.php --- old/vendor/composer/autoload_real.php 2018-04-13 17:40:56.574179695 +0200 +++ new/vendor/composer/autoload_real.php 2018-04-19 14:59:16.166391587 +0200 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit432d689a266ca93b0ad76cebcee4eb27 +class ComposerAutoloaderInita0c56a591185deffae88820ea5cc8e15 { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit432d689a266ca93b0ad76cebcee4eb27', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInita0c56a591185deffae88820ea5cc8e15', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit432d689a266ca93b0ad76cebcee4eb27', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInita0c56a591185deffae88820ea5cc8e15', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInita0c56a591185deffae88820ea5cc8e15::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27::$files; + $includeFiles = Composer\Autoload\ComposerStaticInita0c56a591185deffae88820ea5cc8e15::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire432d689a266ca93b0ad76cebcee4eb27($fileIdentifier, $file); + composerRequirea0c56a591185deffae88820ea5cc8e15($fileIdentifier, $file); } return $loader; } } -function composerRequire432d689a266ca93b0ad76cebcee4eb27($fileIdentifier, $file) +function composerRequirea0c56a591185deffae88820ea5cc8e15($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/composer/autoload_static.php new/vendor/composer/autoload_static.php --- old/vendor/composer/autoload_static.php 2018-04-13 17:40:56.574179695 +0200 +++ new/vendor/composer/autoload_static.php 2018-04-19 14:59:16.166391587 +0200 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27 +class ComposerStaticInita0c56a591185deffae88820ea5cc8e15 { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -195,9 +195,9 @@ public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit432d689a266ca93b0ad76cebcee4eb27::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInita0c56a591185deffae88820ea5cc8e15::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInita0c56a591185deffae88820ea5cc8e15::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInita0c56a591185deffae88820ea5cc8e15::$classMap; }, null, ClassLoader::class); }
