Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2018-01-24 15:32:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Wed Jan 24 15:32:12 2018 rev:33 rq:568799 version:3.27.2 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2018-01-23 13:53:24.860423093 +0100 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2018-01-24 15:32:19.389258493 +0100 @@ -1,0 +2,16 @@ +Wed Jan 24 01:54:55 UTC 2018 - ji...@boombatower.com + +- Update to version 3.27.2: + * Release v3.27.2 + * [self:build] Ignore certain commits from changelog (with [skip changelog]) + * Fix: 'Invalid refresh token' message interception shouldn't check the request for oauth2 + * Update list output in README.md + * Fix link + * Expand API token info in README.md + * [project:create] add detailed help + * [project:create] be stricter about check interval + * Minor correction to 7d41dce97bd5fed4c1f4cda3ca84e1f6a13acb62 + * [subscription:info] allow passing a subscription ID directly + * [project:create] show project ID if possible even after failure + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.27.1.tar.xz New: ---- platformsh-cli-3.27.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.rLXDk9/_old 2018-01-24 15:32:20.117224448 +0100 +++ /var/tmp/diff_new_pack.rLXDk9/_new 2018-01-24 15:32:20.117224448 +0100 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.27.1 +Version: 3.27.2 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.rLXDk9/_old 2018-01-24 15:32:20.149222951 +0100 +++ /var/tmp/diff_new_pack.rLXDk9/_new 2018-01-24 15:32:20.153222764 +0100 @@ -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.27.1</param> + <param name="revision">refs/tags/v3.27.2</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.rLXDk9/_old 2018-01-24 15:32:20.181221454 +0100 +++ /var/tmp/diff_new_pack.rLXDk9/_new 2018-01-24 15:32:20.181221454 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">90ee4b28bc46cef98160e5223ca58d7e5e90900b</param> + <param name="changesrevision">52ea816bec0b04d68feeac9109cf3a1e0d551364</param> </service> </servicedata> ++++++ platformsh-cli-3.27.1.tar.xz -> platformsh-cli-3.27.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/CHANGELOG.md new/platformsh-cli-3.27.2/CHANGELOG.md --- old/platformsh-cli-3.27.1/CHANGELOG.md 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/CHANGELOG.md 2018-01-23 19:08:21.000000000 +0100 @@ -4,6 +4,15 @@ More readable, curated release notes can be found at: https://github.com/platformsh/platformsh-cli/releases +## [v3.27.2](https://github.com/platformsh/platformsh-cli/tree/v3.27.2) (2018-01-23) +[Full Changelog](https://github.com/platformsh/platformsh-cli/compare/v3.27.1...v3.27.2) + +* Fix: 'Invalid refresh token' message interception shouldn't check the request for oauth2 +* [project:create] add detailed help +* [project:create] be stricter about check interval +* [project:create] show project ID if possible even after failure +* [subscription:info] allow passing a subscription ID directly via --id + ## [v3.27.1](https://github.com/platformsh/platformsh-cli/tree/v3.27.1) (2018-01-22) [Full Changelog](https://github.com/platformsh/platformsh-cli/compare/v3.27.0...v3.27.1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/README.md new/platformsh-cli-3.27.2/README.md --- old/platformsh-cli-3.27.1/README.md 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/README.md 2018-01-23 19:08:21.000000000 +0100 @@ -80,9 +80,10 @@ app:config-get View the configuration of an app app:list (apps) List apps in the project auth + auth:browser-login (login) Log in to Platform.sh via a browser auth:info Display your account information - auth:login (login) Log in to Platform.sh using a username and password auth:logout (logout) Log out of Platform.sh + auth:password-login Log in to Platform.sh using a username and password certificate certificate:add Add an SSL certificate to the project certificate:delete Delete a certificate from the project @@ -183,6 +184,22 @@ information. These caches could become out-of-date. You can clear caches with the command `platform clear-cache` (or `platform cc` for short). +## Authentication + +There are currently three ways to authenticate: + +1. `platform login` (AKA `platform auth:browser-login`): this opens a temporary + local server and a browser, allowing you to log in to Platform.sh via the + normal login form, including via services like Bitbucket, GitHub and Google. + +2. `platform auth:password-login`: this allows you to log in with a username and + password, and a two-factor token if applicable. + +3. [API tokens](https://docs.platform.sh/gettingstarted/cli/api-tokens.html): + these allow non-interactive authentication. See + [Customization](#customization) below for how to use an API token. Remember to + use a separate machine account if you want to limit the token's access. + ## Customization You can configure the CLI via the user configuration file `~/.platformsh/config.yaml`. @@ -220,7 +237,7 @@ * `PLATFORMSH_CLI_DEBUG`: set to 1 to enable cURL debugging * `PLATFORMSH_CLI_DISABLE_CACHE`: set to 1 to disable caching * `PLATFORMSH_CLI_SESSION_ID`: change user session (default 'default') -* `PLATFORMSH_CLI_TOKEN`: an API token. _Warning_: storing a secret in an environment variable can be insecure. It is usually preferable to use `config.yaml` as above. +* `PLATFORMSH_CLI_TOKEN`: an API token. _Warning_: storing a secret in an environment variable can be insecure. It may be better to use `config.yaml` as above, depending on your system. The environment variable is preferable on CI systems like Jenkins and GitLab. * `PLATFORMSH_CLI_UPDATES_CHECK`: set to 0 to disable the automatic updates check * `CLICOLOR_FORCE`: set to 1 or 0 to force colorized output on or off, respectively * `http_proxy` or `https_proxy`: specify a proxy for connecting to Platform.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/config.yaml new/platformsh-cli-3.27.2/config.yaml --- old/platformsh-cli-3.27.1/config.yaml 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/config.yaml 2018-01-23 19:08:21.000000000 +0100 @@ -1,7 +1,7 @@ # Metadata about the CLI application itself. application: name: 'Platform.sh CLI' - version: '3.27.1' + version: '3.27.2' 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.27.1/dist/manifest.json new/platformsh-cli-3.27.2/dist/manifest.json --- old/platformsh-cli-3.27.1/dist/manifest.json 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/dist/manifest.json 2018-01-23 19:08:21.000000000 +0100 @@ -1,10 +1,10 @@ [ { "name": "platform.phar", - "sha1": "3924f27f25298c8956cc3488e8091c484ddc5d8f", - "sha256": "949e0577969c519cc74bc1dac7d1478c111a60fdd5aedf9c99691f541a25043e", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.27.1/platform.phar", - "version": "3.27.1", + "sha1": "7163104887c943ed8035f9d42fc87f8baf25edef", + "sha256": "8508e9e766078d1081208184e8393eb9f2616bb79520bb3d0035202417d24508", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.27.2/platform.phar", + "version": "3.27.2", "php": { "min": "5.5.9" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/src/Command/Project/ProjectCreateCommand.php new/platformsh-cli-3.27.2/src/Command/Project/ProjectCreateCommand.php --- old/platformsh-cli-3.27.1/src/Command/Project/ProjectCreateCommand.php 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/src/Command/Project/ProjectCreateCommand.php 2018-01-23 19:08:21.000000000 +0100 @@ -42,8 +42,23 @@ $this->form->configureInputDefinition($this->getDefinition()); $this->addOption('check-timeout', null, InputOption::VALUE_REQUIRED, 'The API timeout while checking the project status', 30) - ->addOption('timeout', null, InputOption::VALUE_REQUIRED, 'The total timeout for all API checks', 900); + ->addOption('timeout', null, InputOption::VALUE_REQUIRED, 'The total timeout for all API checks (0 to disable the timeout)', 900); + $this->setHelp(<<<EOF +Use this command to create a new project. + +An interactive form will be presented with the available options. But if the +command is run non-interactively (with --yes), the form will not be displayed, +and the --region option will be required. + +A project subscription will be requested, and then checked periodically (every 3 +seconds) until the project has been activated, or until the process times out +(after 15 minutes by default). + +If known, the project ID will be output to STDOUT. All other output will be sent +to STDERR. +EOF + ); } /** @@ -109,10 +124,10 @@ // which allows the server a little more leeway to act on the // initial request. if (time() - $lastCheck >= $checkInterval) { + $lastCheck = time(); try { // The API call will timeout after $checkTimeout seconds. $subscription->refresh(['timeout' => $checkTimeout, 'exceptions' => false]); - $lastCheck = time(); } catch (ConnectException $e) { if (strpos($e->getMessage(), 'timed out') !== false) { $this->debug($e->getMessage()); @@ -129,10 +144,16 @@ if (!$subscription->isActive()) { if ($timedOut) { $this->stdErr->writeln('<error>The project failed to activate on time</error>'); - $this->stdErr->writeln('View your active projects at: ' . $this->config()->get('service.accounts_url')); } else { $this->stdErr->writeln('<error>The project failed to activate</error>'); } + + if (!empty($subscription->project_id)) { + $output->writeln($subscription->project_id); + } + + $this->stdErr->writeln(sprintf('View your active projects with: <info>%s project:list</info>', $this->config()->get('application.executable'))); + return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/src/Command/Self/SelfBuildCommand.php new/platformsh-cli-3.27.2/src/Command/Self/SelfBuildCommand.php --- old/platformsh-cli-3.27.1/src/Command/Self/SelfBuildCommand.php 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/src/Command/Self/SelfBuildCommand.php 2018-01-23 19:08:21.000000000 +0100 @@ -195,6 +195,10 @@ 'log', '--pretty=format:* %s', '--no-merges', + '--invert-grep', + '--grep=(Release v|\[skip changelog\])', + '--perl-regexp', + '--regexp-ignore-case', 'v' . $oldVersion . '...master' ]); $changelog = is_string($changelog) ? $changelog : ''; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/src/Command/SubscriptionInfoCommand.php new/platformsh-cli-3.27.2/src/Command/SubscriptionInfoCommand.php --- old/platformsh-cli-3.27.1/src/Command/SubscriptionInfoCommand.php 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/src/Command/SubscriptionInfoCommand.php 2018-01-23 19:08:21.000000000 +0100 @@ -8,6 +8,7 @@ use Platformsh\Client\Model\Subscription; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class SubscriptionInfoCommand extends CommandBase @@ -26,6 +27,7 @@ ->setName('subscription:info') ->addArgument('property', InputArgument::OPTIONAL, 'The name of the property') ->addArgument('value', InputArgument::OPTIONAL, 'Set a new value for the property') + ->addOption('id', 's', InputOption::VALUE_REQUIRED, 'The subscription ID') ->setDescription('Read subscription properties'); PropertyFormatter::configureInput($this->getDefinition()); Table::configureInput($this->getDefinition()); @@ -37,13 +39,17 @@ protected function execute(InputInterface $input, OutputInterface $output) { - $this->validateInput($input); + $id = $input->getOption('id'); + if (empty($id)) { + $this->validateInput($input); + $project = $this->getSelectedProject(); + $id = $project->getSubscriptionId(); + } - $project = $this->getSelectedProject(); $subscription = $this->api()->getClient() - ->getSubscription($project->getSubscriptionId()); + ->getSubscription($id); if (!$subscription) { - $this->stdErr->writeln("Subscription not found"); + $this->stdErr->writeln(sprintf('Subscription not found: <error>%s</error>', $id)); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.27.1/src/Console/EventSubscriber.php new/platformsh-cli-3.27.2/src/Console/EventSubscriber.php --- old/platformsh-cli-3.27.1/src/Console/EventSubscriber.php 2018-01-22 13:36:58.000000000 +0100 +++ new/platformsh-cli-3.27.2/src/Console/EventSubscriber.php 2018-01-23 19:08:21.000000000 +0100 @@ -68,7 +68,6 @@ // Create a friendlier message for the OAuth2 "Invalid refresh token" // error. if ($response->getStatusCode() === 400 - && $requestConfig['auth'] === 'oauth2' && isset($json['error_description']) && $json['error_description'] === 'Invalid refresh token') { $event->setException(new LoginRequiredException( ++++++ 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-01-23 06:15:27.715721172 +0100 +++ new/vendor/autoload.php 2018-01-24 02:55:04.668279728 +0100 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitd6da0633bacdf02d08e7b85a96cc4544::getLoader(); +return ComposerAutoloaderInitf6d8b9bb9c0fe6da0db70557bf02951c::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-01-23 06:15:27.715721172 +0100 +++ new/vendor/composer/autoload_real.php 2018-01-24 02:55:04.668279728 +0100 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitd6da0633bacdf02d08e7b85a96cc4544 +class ComposerAutoloaderInitf6d8b9bb9c0fe6da0db70557bf02951c { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitd6da0633bacdf02d08e7b85a96cc4544', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitf6d8b9bb9c0fe6da0db70557bf02951c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitd6da0633bacdf02d08e7b85a96cc4544', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitf6d8b9bb9c0fe6da0db70557bf02951c', '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\ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c::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\ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequired6da0633bacdf02d08e7b85a96cc4544($fileIdentifier, $file); + composerRequiref6d8b9bb9c0fe6da0db70557bf02951c($fileIdentifier, $file); } return $loader; } } -function composerRequired6da0633bacdf02d08e7b85a96cc4544($fileIdentifier, $file) +function composerRequiref6d8b9bb9c0fe6da0db70557bf02951c($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-01-23 06:15:27.715721172 +0100 +++ new/vendor/composer/autoload_static.php 2018-01-24 02:55:04.668279728 +0100 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544 +class ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -189,9 +189,9 @@ public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitd6da0633bacdf02d08e7b85a96cc4544::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitf6d8b9bb9c0fe6da0db70557bf02951c::$classMap; }, null, ClassLoader::class); }