Hello community,
here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2018-11-13 17:02:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old)
and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli"
Tue Nov 13 17:02:39 2018 rev:58 rq:648623 version:3.36.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2018-10-15 09:43:37.763359041 +0200
+++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2018-11-13 17:35:48.948770944 +0100
@@ -1,0 +2,19 @@
+Mon Nov 12 21:48:13 UTC 2018 - jimmy@boombatower.com
+
+- Update to version 3.36.0:
+ * Release v3.36.0
+ * Fix dev version [skip changelog]
+ * Use heredoc for command help
+ * Deprecate the --type option in integration:update
+ * Consistent formatting for validation errors from other integration commands
+ * Add integration:validate command
+ * Fix further source of 'Not logged in' errors immediately after login
+ * Do not cache commit API metadata
+ * Fix alpha UI URLs for environments in web command
+ * Release v3.35.4
+ * Fix occasional LoginRequiredException at the end of login
+ * Fix logout check for other sessions
+ * Support forcing color off via PLATFORMSH_CLI_NO_COLOR=1 or NO_COLOR=1
+ * [self:release]: remove release confirmation step [skip changelog]
+
+-------------------------------------------------------------------
Old:
----
platformsh-cli-3.35.3.tar.xz
New:
----
platformsh-cli-3.36.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ platformsh-cli.spec ++++++
--- /var/tmp/diff_new_pack.tZGECd/_old 2018-11-13 17:35:49.500770183 +0100
+++ /var/tmp/diff_new_pack.tZGECd/_new 2018-11-13 17:35:49.500770183 +0100
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: platformsh-cli
-Version: 3.35.3
+Version: 3.36.0
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.tZGECd/_old 2018-11-13 17:35:49.524770149 +0100
+++ /var/tmp/diff_new_pack.tZGECd/_new 2018-11-13 17:35:49.528770144 +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.35.3</param>
+ <param name="revision">refs/tags/v3.36.0</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.tZGECd/_old 2018-11-13 17:35:49.540770128 +0100
+++ /var/tmp/diff_new_pack.tZGECd/_new 2018-11-13 17:35:49.540770128 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/platformsh/platformsh-cli.git</param>
- <param name="changesrevision">83849efa1ad6d69c845e84c233785913bb1938bb</param>
+ <param name="changesrevision">b1527de03ff889b8dbff21f90cb4c4993e2e0e66</param>
</service>
</servicedata>
++++++ licenses.txt ++++++
--- /var/tmp/diff_new_pack.tZGECd/_old 2018-11-13 17:35:49.576770078 +0100
+++ /var/tmp/diff_new_pack.tZGECd/_new 2018-11-13 17:35:49.576770078 +0100
@@ -17,7 +17,7 @@
padraic/humbug_get_contents 1.1.2 BSD-3-Clause
padraic/phar-updater v1.0.5 BSD-3-Clause
paragonie/random_compat v2.0.11 MIT
-platformsh/client v0.20.2 MIT
+platformsh/client v0.22.1 MIT
platformsh/console-form v0.0.23 MIT
psr/container 1.0.0 MIT
psr/log 1.0.2 MIT
++++++ platformsh-cli-3.35.3.tar.xz -> platformsh-cli-3.36.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/README.md new/platformsh-cli-3.36.0/README.md
--- old/platformsh-cli-3.35.3/README.md 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/README.md 2018-10-24 17:43:24.000000000 +0200
@@ -261,6 +261,7 @@
* `PLATFORMSH_CLI_DEBUG`: set to 1 to enable cURL debugging. _Warning_: this will print all request information in the terminal, including sensitive access tokens.
* `PLATFORMSH_CLI_DISABLE_CACHE`: set to 1 to disable caching
+* `PLATFORMSH_CLI_NO_COLOR`: enable (set to 1) to force colorized output off
* `PLATFORMSH_CLI_SESSION_ID`: change user session (default 'default')
* `PLATFORMSH_CLI_SHELL_CONFIG_FILE`: specify the shell configuration file that the installer should write to (as an absolute path). If not set, a file such as `~/.bashrc` will be chosen automatically. Set this to an empty string to disable writing to a shell config file.
* `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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/composer.json new/platformsh-cli-3.36.0/composer.json
--- old/platformsh-cli-3.35.3/composer.json 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/composer.json 2018-10-24 17:43:24.000000000 +0200
@@ -8,7 +8,7 @@
"guzzlehttp/guzzle": "^5.3",
"guzzlehttp/ringphp": "^1.1",
"platformsh/console-form": ">=0.0.22 <2.0",
- "platformsh/client": ">=0.20.2 <2.0",
+ "platformsh/client": ">=0.22.1 <2.0",
"symfony/console": "^3.0 >=3.2",
"symfony/yaml": "^3.0 || ^2.6",
"symfony/finder": "^3.0",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/composer.lock new/platformsh-cli-3.36.0/composer.lock
--- old/platformsh-cli-3.35.3/composer.lock 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/composer.lock 2018-10-24 17:43:24.000000000 +0200
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "683a401d37c922ba8fd60e6a691587f7",
+ "content-hash": "3f6608131c957d3fd6b9a6e2caeffa8d",
"packages": [
{
"name": "cocur/slugify",
@@ -711,16 +711,16 @@
},
{
"name": "platformsh/client",
- "version": "v0.20.2",
+ "version": "v0.22.1",
"source": {
"type": "git",
"url": "https://github.com/platformsh/platformsh-client-php.git",
- "reference": "220947685624464455d8ae3022c418ae832ce85e"
+ "reference": "2ef2052bb1a7a3c4e840548607c45a31988f28bd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/220947...",
- "reference": "220947685624464455d8ae3022c418ae832ce85e",
+ "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/2ef205...",
+ "reference": "2ef2052bb1a7a3c4e840548607c45a31988f28bd",
"shasum": ""
},
"require": {
@@ -756,7 +756,7 @@
}
],
"description": "Platform.sh API client",
- "time": "2018-10-12T16:21:31+00:00"
+ "time": "2018-10-24T13:03:12+00:00"
},
{
"name": "platformsh/console-form",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/config.yaml new/platformsh-cli-3.36.0/config.yaml
--- old/platformsh-cli-3.35.3/config.yaml 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/config.yaml 2018-10-24 17:43:24.000000000 +0200
@@ -1,7 +1,7 @@
# Metadata about the CLI application itself.
application:
name: 'Platform.sh CLI'
- version: '3.35.3'
+ version: '3.36.0'
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.35.3/dist/manifest.json new/platformsh-cli-3.36.0/dist/manifest.json
--- old/platformsh-cli-3.35.3/dist/manifest.json 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/dist/manifest.json 2018-10-24 17:43:24.000000000 +0200
@@ -1,10 +1,10 @@
[
{
"name": "platform.phar",
- "sha1": "5d6b774f6123893f2f6bf39c43ab3575bcac1048",
- "sha256": "c8df4ae595fa0311a36ebbbb795d559a8524fe61e1a711702877899abf18dfec",
- "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.35.3/platf...",
- "version": "3.35.3",
+ "sha1": "c7badfe42069dc937eed95f67ff95741d1e50707",
+ "sha256": "ee3352a1cb799eee5cd727f5c880bf951110109d9ded2c64ffff0ef11de1c0e2",
+ "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.36.0/platf...",
+ "version": "3.36.0",
"php": {
"min": "5.5.9"
},
@@ -142,6 +142,11 @@
"notes": "New features:\n\n* Add commit:list (commits) and commit:get commands for viewing commits via the\n API.\n* Add --commit (-c) option to repo:cat and repo:ls commands.\n* Add Bitbucket integration support.\n\nBug fixes:\n\n* Fix drush alias group name prepending bug. Custom aliases were having the\n alias group name prepended every time they were recreated, e.g. \"@foo.bar\"\n would become \"@foo.foo.bar\".\n* Allow changing the value of a project-level sensitive variable.\n\nOther changes:\n\n* Add explanations for \"Operation not available\" on environment actions.\n* Add additional help for the mount:size command.\n* Clean up --pipe output in the user:get command.\n* Show hidden service commands.",
"show from": "3.34.0",
"hide from": "3.35.0"
+ },
+ {
+ "notes": "* Fix a further source of 'Not logged in' errors immediately after login.\n* Add `integration:validate` command, and improve error reporting in other\n integration commands.\n* Deprecate the --type option in the `integration:update` command.\n* Fix alpha UI URLs for environments in the `web` command.",
+ "show from": "3.35.0",
+ "hide from": "3.36.0"
}
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Application.php new/platformsh-cli-3.36.0/src/Application.php
--- old/platformsh-cli-3.35.3/src/Application.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Application.php 2018-10-24 17:43:24.000000000 +0200
@@ -140,6 +140,7 @@
$commands[] = new Command\Integration\IntegrationGetCommand();
$commands[] = new Command\Integration\IntegrationListCommand();
$commands[] = new Command\Integration\IntegrationUpdateCommand();
+ $commands[] = new Command\Integration\IntegrationValidateCommand();
$commands[] = new Command\Local\LocalBuildCommand();
$commands[] = new Command\Local\LocalCleanCommand();
$commands[] = new Command\Local\LocalDrushAliasesCommand();
@@ -242,13 +243,18 @@
$input->setInteractive(false);
}
- // Allow the CLICOLOR_FORCE environment variable to override whether
- // colors are used in the output.
+ // Allow the NO_COLOR, CLICOLOR_FORCE, and TERM environment variables to
+ // override whether colors are used in the output.
+ // See: https://no-color.org
+ // See: https://en.wikipedia.org/wiki/Computer_terminal#Dumb_terminals
/* @see StreamOutput::hasColorSupport() */
- if (getenv('CLICOLOR_FORCE') === '0') {
- $output->setDecorated(false);
- } elseif (getenv('CLICOLOR_FORCE') === '1') {
+ if (getenv('CLICOLOR_FORCE') === '1') {
$output->setDecorated(true);
+ } elseif (getenv('NO_COLOR')
+ || getenv('CLICOLOR_FORCE') === '0'
+ || getenv('TERM') === 'dumb'
+ || getenv($this->cliConfig->get('application.env_prefix') . 'NO_COLOR')) {
+ $output->setDecorated(false);
}
parent::configureIO($input, $output);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Auth/BrowserLoginCommand.php new/platformsh-cli-3.36.0/src/Command/Auth/BrowserLoginCommand.php
--- old/platformsh-cli-3.35.3/src/Command/Auth/BrowserLoginCommand.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/Auth/BrowserLoginCommand.php 2018-10-24 17:43:24.000000000 +0200
@@ -213,9 +213,11 @@
$cache = $this->getService('cache');
$cache->flushAll();
+ // Save the new tokens to the persistent session.
+ $this->saveAccessToken($token, $this->api()->getClient(false)->getConnector()->getSession());
+
// Reset the API client so that it will use the new tokens.
$client = $this->api()->getClient(false, true);
- $this->saveAccessToken($token, $client->getConnector()->getSession());
$this->stdErr->writeln('You are logged in.');
// Show user account info.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Auth/LogoutCommand.php new/platformsh-cli-3.36.0/src/Command/Auth/LogoutCommand.php
--- old/platformsh-cli-3.35.3/src/Command/Auth/LogoutCommand.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/Auth/LogoutCommand.php 2018-10-24 17:43:24.000000000 +0200
@@ -62,7 +62,7 @@
$fs->remove($sessionsDir);
$this->stdErr->writeln('All session files have been deleted.');
}
- } elseif (is_dir($sessionsDir) && glob($sessionsDir . '/sess-cli-*', GLOB_NOSORT)) {
+ } elseif (is_dir($sessionsDir) && glob($sessionsDir . '/sess-cli-*/*', GLOB_NOSORT)) {
$this->stdErr->writeln(sprintf(
'Other session files exist. Delete them with: <comment>%s logout --all</comment>',
$config->get('application.executable')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/CommandBase.php new/platformsh-cli-3.36.0/src/Command/CommandBase.php
--- old/platformsh-cli-3.35.3/src/Command/CommandBase.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/CommandBase.php 2018-10-24 17:43:24.000000000 +0200
@@ -1157,21 +1157,25 @@
}
/**
- * Print a warning about an deprecated option.
+ * Print a warning about deprecated option(s).
*
- * @param string[] $options
+ * @param string[] $options A list of option names (without "--").
+ * @param string|null $template The warning message template. "%s" is
+ * replaced by the option name.
*/
- protected function warnAboutDeprecatedOptions(array $options)
+ protected function warnAboutDeprecatedOptions(array $options, $template = null)
{
if (!isset($this->input)) {
return;
}
+ if ($template === null) {
+ $template = 'The option --%s is deprecated and no longer used. It will be removed in a future version.';
+ }
foreach ($options as $option) {
if ($this->input->hasOption($option) && $this->input->getOption($option)) {
$this->labeledMessage(
'DEPRECATED',
- 'The option --' . $option . ' is deprecated and no longer used. It will be removed in a future version.',
- OutputInterface::VERBOSITY_VERBOSE
+ sprintf($template, $option)
);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationAddCommand.php new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationAddCommand.php
--- old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationAddCommand.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationAddCommand.php 2018-10-24 17:43:24.000000000 +0200
@@ -1,6 +1,7 @@
getSelectedProject()
- ->addIntegration($values['type'], $values);
+
+ try {
+ $result = $this->getSelectedProject()
+ ->addIntegration($values['type'], $values);
+ } catch (BadResponseException $e) {
+ if ($errors = Integration::listValidationErrors($e)) {
+ $this->stdErr->writeln('<error>The integration is invalid.</error>');
+ $this->stdErr->writeln('');
+ $this->listValidationErrors($errors, $output);
+
+ return 4;
+ }
+
+ throw $e;
+ }
/** @var Integration $integration */
$integration = $result->getEntity();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationCommandBase.php new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationCommandBase.php
--- old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationCommandBase.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationCommandBase.php 2018-10-24 17:43:24.000000000 +0200
@@ -12,6 +12,7 @@
use Platformsh\ConsoleForm\Field\OptionsField;
use Platformsh\ConsoleForm\Field\UrlField;
use Platformsh\ConsoleForm\Form;
+use Symfony\Component\Console\Output\OutputInterface;
abstract class IntegrationCommandBase extends CommandBase
{
@@ -575,4 +576,30 @@
return TRUE;
}
+
+ /**
+ * Lists validation errors found in an integration.
+ *
+ * @param array $errors
+ * @param \Symfony\Component\Console\Output\OutputInterface $output
+ */
+ protected function listValidationErrors(array $errors, OutputInterface $output)
+ {
+ if (count($errors) === 1) {
+ $this->stdErr->writeln('The following error was found:');
+ } else {
+ $this->stdErr->writeln(sprintf(
+ 'The following %d errors were found:',
+ count($errors)
+ ));
+ }
+
+ foreach ($errors as $key => $error) {
+ if (is_string($key) && strlen($key)) {
+ $output->writeln("$key: $error");
+ } else {
+ $output->writeln($error);
+ }
+ }
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationUpdateCommand.php new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationUpdateCommand.php
--- old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationUpdateCommand.php 2018-10-12 18:32:40.000000000 +0200
+++ new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationUpdateCommand.php 2018-10-24 17:43:24.000000000 +0200
@@ -1,6 +1,7 @@
warnAboutDeprecatedOptions(
+ ['type'],
+ 'The option --%s is deprecated and will be removed in a future version.'
+ );
+
$this->validateInput($input);
$id = $input->getArgument('id');
@@ -76,7 +82,25 @@
return 1;
}
- $result = $integration->update($newValues);
+ try {
+ $result = $integration->update($newValues);
+ } catch (BadResponseException $e) {
+ $errors = $integration->listValidationErrors($e);
+ if ($errors) {
+ $this->stdErr->writeln(sprintf(
+ 'The integration <error>%s</error> (type: %s) is invalid.',
+ $integration->id,
+ $integration->type
+ ));
+ $this->stdErr->writeln('');
+ $this->listValidationErrors($errors, $output);
+
+ return 4;
+ }
+
+ throw $e;
+ }
+
$this->stdErr->writeln("Integration <info>{$integration->id}</info> (<info>{$integration->type}</info>) updated");
$this->ensureHooks($integration);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationValidateCommand.php new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationValidateCommand.php
--- old/platformsh-cli-3.35.3/src/Command/Integration/IntegrationValidateCommand.php 1970-01-01 01:00:00.000000000 +0100
+++ new/platformsh-cli-3.36.0/src/Command/Integration/IntegrationValidateCommand.php 2018-10-24 17:43:24.000000000 +0200
@@ -0,0 +1,98 @@
+setName('integration:validate')
+ ->addArgument('id', InputArgument::OPTIONAL, 'An integration ID. Leave blank to choose from a list.')
+ ->setDescription('Validate an existing integration');
+ $this->addProjectOption();
+ $this->setHelp(<<