Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2017-08-29 11:46:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Tue Aug 29 11:46:46 2017 rev:17 rq:519223 version:3.20.1 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2017-08-16 16:18:45.422907840 +0200 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2017-08-29 11:48:06.394274119 +0200 @@ -1,0 +2,12 @@ +Mon Aug 28 20:20:01 UTC 2017 - [email protected] + +- Update to version 3.20.1: + * Easy install on Platform.sh environments + * No need to "source .environment" + * Write to tmp if config directory is not available + * Show ID of users (#618) (#619) + * Docs can no longer be searched by URL + * Use the local Drush if possible (#621) + * Release v3.20.1 + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.20.0.tar.xz New: ---- platformsh-cli-3.20.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.21QWg4/_old 2017-08-29 11:48:07.526114587 +0200 +++ /var/tmp/diff_new_pack.21QWg4/_new 2017-08-29 11:48:07.538112897 +0200 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.20.0 +Version: 3.20.1 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.21QWg4/_old 2017-08-29 11:48:07.682092602 +0200 +++ /var/tmp/diff_new_pack.21QWg4/_new 2017-08-29 11:48:07.686092039 +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.20.0</param> + <param name="revision">refs/tags/v3.20.1</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.21QWg4/_old 2017-08-29 11:48:07.754082456 +0200 +++ /var/tmp/diff_new_pack.21QWg4/_new 2017-08-29 11:48:07.758081892 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">48241718f7d61b41206871f8f0a13bea2e341181</param> + <param name="changesrevision">c113051c280d815807ee8125943571a33ced2158</param> </service> </servicedata> ++++++ platformsh-cli-3.20.0.tar.xz -> platformsh-cli-3.20.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/config.yaml new/platformsh-cli-3.20.1/config.yaml --- old/platformsh-cli-3.20.0/config.yaml 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/config.yaml 2017-08-23 20:20:41.000000000 +0200 @@ -1,7 +1,7 @@ # Metadata about the CLI application itself. application: name: 'Platform.sh CLI' - version: '3.20.0' + version: '3.20.1' executable: 'platform' package_name: 'platformsh/cli' installer_url: 'https://platform.sh/cli/installer' @@ -9,6 +9,7 @@ user_config_dir: '.platformsh' user_state_file: '.platformsh/state.json' env_prefix: 'PLATFORMSH_CLI_' + tmp_sub_dir: 'platformsh-cli-tmp' # Configuration for working with projects locally. local: @@ -32,7 +33,7 @@ app_config_file: '.platform.app.yaml' project_config_dir: '.platform' docs_url: 'https://docs.platform.sh' - docs_search_url: 'https://docs.platform.sh/?q={{ terms }}' + docs_search_url: 'https://www.google.com/search?q=site%3Adocs.platform.sh%20{{ terms }}' accounts_url: 'https://accounts.platform.sh' pricing_url: 'https://platform.sh/pricing' available_regions: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/dist/installer.php new/platformsh-cli-3.20.1/dist/installer.php --- old/platformsh-cli-3.20.0/dist/installer.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/dist/installer.php 2017-08-23 20:20:41.000000000 +0200 @@ -9,6 +9,7 @@ define('CLI_EXECUTABLE', 'platform'); define('CLI_NAME', 'Platform.sh CLI'); define('CLI_PHAR', CLI_EXECUTABLE . '.phar'); +define('CLI_SERVICE_ENV_PREFIX', 'PLATFORM_'); set_error_handler( function ($code, $message) { @@ -236,7 +237,7 @@ if ($shellConfigFile = findShellConfigFile($home)) { output(" Configuring the shell..."); $configured = true; - $currentShellConfig = file_get_contents($shellConfigFile); + $currentShellConfig = file_exists($shellConfigFile) ? file_get_contents($shellConfigFile) : false; if ($currentShellConfig === false) { $currentShellConfig = ''; } @@ -264,7 +265,9 @@ if ($configured) { output(PHP_EOL . "To get started, run:", 'info'); $toSource = getcwd() === $home ? str_replace(getcwd() . '/', '', $shellConfigFile) : $shellConfigFile; - output(' source ' . $toSource); + if ($toSource !== '.environment') { + output(' source ' . $toSource); + } output(' ' . CLI_EXECUTABLE); } else { output(PHP_EOL . "Add this to your shell configuration file:", 'info'); @@ -374,6 +377,13 @@ */ function findShellConfigFile($home) { + // Special handling for the .environment file on Platform.sh environments. + if (getenv(CLI_SERVICE_ENV_PREFIX . 'PROJECT') !== false + && getenv(CLI_SERVICE_ENV_PREFIX . 'APP_DIR') !== false + && getenv(CLI_SERVICE_ENV_PREFIX . 'APP_DIR') === $home) { + return getenv(CLI_SERVICE_ENV_PREFIX . 'APP_DIR') . '/.environment'; + } + $candidates = array( '.bash_profile', '.bashrc', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/Auth/LogoutCommand.php new/platformsh-cli-3.20.1/src/Command/Auth/LogoutCommand.php --- old/platformsh-cli-3.20.0/src/Command/Auth/LogoutCommand.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/Auth/LogoutCommand.php 2017-08-23 20:20:41.000000000 +0200 @@ -53,7 +53,7 @@ $this->stdErr->writeln('You are now logged out.'); $config = $this->config(); - $sessionsDir = $config->getUserConfigDir() . '/.session'; + $sessionsDir = $config->getWritableUserDir() . '/.session'; if ($input->getOption('all')) { if (is_dir($sessionsDir)) { /** @var \Platformsh\Cli\Service\Filesystem $fs */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/MultiCommand.php new/platformsh-cli-3.20.1/src/Command/MultiCommand.php --- old/platformsh-cli-3.20.0/src/Command/MultiCommand.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/MultiCommand.php 2017-08-23 20:20:41.000000000 +0200 @@ -120,7 +120,7 @@ } $dialogRc = file_get_contents(CLI_ROOT . '/resources/console/dialogrc'); - $dialogRcFile = $this->config()->getUserConfigDir() . '/dialogrc'; + $dialogRcFile = $this->config()->getWritableUserDir() . '/dialogrc'; if ($dialogRc !== false && (file_exists($dialogRcFile) || file_put_contents($dialogRcFile, $dialogRc))) { putenv('DIALOGRC=' . $dialogRcFile); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/Server/ServerCommandBase.php new/platformsh-cli-3.20.1/src/Command/Server/ServerCommandBase.php --- old/platformsh-cli-3.20.0/src/Command/Server/ServerCommandBase.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/Server/ServerCommandBase.php 2017-08-23 20:20:41.000000000 +0200 @@ -98,7 +98,7 @@ if (!isset($this->serverInfo)) { $this->serverInfo = []; // @todo move this to State service (in a new major version) - $filename = $this->config()->getUserConfigDir() . '/local-servers.json'; + $filename = $this->config()->getWritableUserDir() . '/local-servers.json'; if (file_exists($filename)) { $this->serverInfo = (array) json_decode(file_get_contents($filename), true); } @@ -120,7 +120,7 @@ protected function saveServerInfo() { - $filename = $this->config()->getUserConfigDir() . '/local-servers.json'; + $filename = $this->config()->getWritableUserDir() . '/local-servers.json'; if (!empty($this->serverInfo)) { if (!file_put_contents($filename, json_encode($this->serverInfo))) { throw new \RuntimeException('Failed to write server info to: ' . $filename); @@ -206,7 +206,7 @@ */ protected function getPidFile($address) { - return $this->config()->getUserConfigDir() . '/server-' . preg_replace('/\W+/', '-', $address) . '.pid'; + return $this->config()->getWritableUserDir() . '/server-' . preg_replace('/\W+/', '-', $address) . '.pid'; } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/Tunnel/TunnelCommandBase.php new/platformsh-cli-3.20.1/src/Command/Tunnel/TunnelCommandBase.php --- old/platformsh-cli-3.20.0/src/Command/Tunnel/TunnelCommandBase.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/Tunnel/TunnelCommandBase.php 2017-08-23 20:20:41.000000000 +0200 @@ -68,7 +68,7 @@ if (!isset($this->tunnelInfo)) { $this->tunnelInfo = []; // @todo move this to State service (in a new major version) - $filename = $this->config()->getUserConfigDir() . '/tunnel-info.json'; + $filename = $this->config()->getWritableUserDir() . '/tunnel-info.json'; if (file_exists($filename)) { $this->debug(sprintf('Loading tunnel info from %s', $filename)); $this->tunnelInfo = (array) json_decode(file_get_contents($filename), true); @@ -97,7 +97,7 @@ protected function saveTunnelInfo() { - $filename = $this->config()->getUserConfigDir() . '/tunnel-info.json'; + $filename = $this->config()->getWritableUserDir() . '/tunnel-info.json'; if (!empty($this->tunnelInfo)) { $this->debug('Saving tunnel info to: ' . $filename); if (!file_put_contents($filename, json_encode($this->tunnelInfo))) { @@ -208,7 +208,7 @@ protected function getPidFile(array $tunnel) { $key = $this->getTunnelKey($tunnel); - $dir = $this->config()->getUserConfigDir() . '/.tunnels'; + $dir = $this->config()->getWritableUserDir() . '/.tunnels'; if (!is_dir($dir) && !mkdir($dir, 0700, true)) { throw new \RuntimeException('Failed to create directory: ' . $dir); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/Tunnel/TunnelOpenCommand.php new/platformsh-cli-3.20.1/src/Command/Tunnel/TunnelOpenCommand.php --- old/platformsh-cli-3.20.0/src/Command/Tunnel/TunnelOpenCommand.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/Tunnel/TunnelOpenCommand.php 2017-08-23 20:20:41.000000000 +0200 @@ -53,7 +53,7 @@ return 1; } - $logFile = $this->config()->getUserConfigDir() . '/tunnels.log'; + $logFile = $this->config()->getWritableUserDir() . '/tunnels.log'; if (!$log = $this->openLog($logFile)) { $this->stdErr->writeln(sprintf('Failed to open log file for writing: %s', $logFile)); return 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Command/User/UserListCommand.php new/platformsh-cli-3.20.1/src/Command/User/UserListCommand.php --- old/platformsh-cli-3.20.0/src/Command/User/UserListCommand.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Command/User/UserListCommand.php 2017-08-23 20:20:41.000000000 +0200 @@ -39,12 +39,12 @@ $role .= ' (owner)'; } } - $rows[$weight] = [$account['email'], $account['display_name'], $role]; + $rows[$weight] = [$account['email'], $account['display_name'], $role, $projectAccess->id]; } ksort($rows); - $table->render(array_values($rows), ['Email address', 'Name', 'Project role']); + $table->render(array_values($rows), ['Email address', 'Name', 'Project role', 'ID']); return 0; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Service/Api.php new/platformsh-cli-3.20.1/src/Service/Api.php --- old/platformsh-cli-3.20.0/src/Service/Api.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Service/Api.php 2017-08-23 20:20:41.000000000 +0200 @@ -186,7 +186,7 @@ // $HOME/.platformsh/.session/sess-cli-default/sess-cli-default.json $session = $connector->getSession(); $session->setId('cli-' . $this->sessionId); - $session->setStorage(new File($this->config->getUserConfigDir() . '/.session')); + $session->setStorage(new File($this->config->getWritableUserDir() . '/.session')); self::$client = new PlatformClient($connector); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Service/CacheFactory.php new/platformsh-cli-3.20.1/src/Service/CacheFactory.php --- old/platformsh-cli-3.20.0/src/Service/CacheFactory.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Service/CacheFactory.php 2017-08-23 20:20:41.000000000 +0200 @@ -20,7 +20,7 @@ } return new FilesystemCache( - $cliConfig->getUserConfigDir() . '/cache', + $cliConfig->getWritableUserDir() . '/cache', FilesystemCache::EXTENSION, 0077 // Remove all permissions from the group and others. ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Service/Config.php new/platformsh-cli-3.20.1/src/Service/Config.php --- old/platformsh-cli-3.20.0/src/Service/Config.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Service/Config.php 2017-08-23 20:20:41.000000000 +0200 @@ -70,6 +70,22 @@ } /** + * @return string + */ + public function getWritableUserDir() + { + $configDir = $this->getUserConfigDir(); + + // If the config directory is not writable (e.g. if we are on a + // Platform.sh environment), use a temporary directory instead. + if (!is_writable($configDir)) { + return sys_get_temp_dir() . '/' . $this->get('application.tmp_sub_dir'); + } + + return $configDir; + } + + /** * @param string $filename * * @return array diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.20.0/src/Service/Drush.php new/platformsh-cli-3.20.1/src/Service/Drush.php --- old/platformsh-cli-3.20.0/src/Service/Drush.php 2017-08-14 17:36:21.000000000 +0200 +++ new/platformsh-cli-3.20.1/src/Service/Drush.php 2017-08-23 20:20:41.000000000 +0200 @@ -146,6 +146,20 @@ return $this->config->get('local.drush_executable'); } + // Find a locally installed Drush instance, either directly via Composer + // or indirectly via the local build dependencies. + if ($projectRoot = $this->localProject->getProjectRoot()) { + $drushLocal = $projectRoot . '/vendor/bin/drush'; + if (is_executable($drushLocal)) { + return $drushLocal; + } + + $drushDep = $projectRoot . '/' . $this->config->get('local.dependencies_dir') . '/php/vendor/bin/drush'; + if (is_executable($drushDep)) { + return $drushDep; + } + } + return $this->shellHelper->resolveCommand('drush'); } ++++++ 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 2017-08-14 23:33:07.732611180 +0200 +++ new/vendor/autoload.php 2017-08-28 22:20:04.546440044 +0200 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitb6506811e4b3232d0fae5c2d61c458bc::getLoader(); +return ComposerAutoloaderInit43da8b7e837c7fede5b52ed96b8e8c7d::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 2017-08-14 23:33:07.732611180 +0200 +++ new/vendor/composer/autoload_real.php 2017-08-28 22:20:04.546440044 +0200 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb6506811e4b3232d0fae5c2d61c458bc +class ComposerAutoloaderInit43da8b7e837c7fede5b52ed96b8e8c7d { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitb6506811e4b3232d0fae5c2d61c458bc', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit43da8b7e837c7fede5b52ed96b8e8c7d', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitb6506811e4b3232d0fae5c2d61c458bc', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit43da8b7e837c7fede5b52ed96b8e8c7d', '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\ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d::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\ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireb6506811e4b3232d0fae5c2d61c458bc($fileIdentifier, $file); + composerRequire43da8b7e837c7fede5b52ed96b8e8c7d($fileIdentifier, $file); } return $loader; } } -function composerRequireb6506811e4b3232d0fae5c2d61c458bc($fileIdentifier, $file) +function composerRequire43da8b7e837c7fede5b52ed96b8e8c7d($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 2017-08-14 23:33:07.732611180 +0200 +++ new/vendor/composer/autoload_static.php 2017-08-28 22:20:04.546440044 +0200 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc +class ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -183,9 +183,9 @@ public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitb6506811e4b3232d0fae5c2d61c458bc::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit43da8b7e837c7fede5b52ed96b8e8c7d::$classMap; }, null, ClassLoader::class); }
