Skip to content

Commit

Permalink
[LOPS-2255] Replace siteish by siteenv. (#56)
Browse files Browse the repository at this point in the history
* Replace siteish by siteenv.

* Also install coreutils.
  • Loading branch information
kporras07 authored May 8, 2024
1 parent 952a52b commit cbbc0d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
uses: actions/download-artifact@v3
with:
name: full-workspace
- name: Install jq
run: brew install jq
- name: Install jq and coreutils
run: brew install jq coreutils
- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@main
with:
Expand Down
10 changes: 5 additions & 5 deletions src/Commands/SiteDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SiteDeleteCommand extends SecretBaseCommand implements SiteAwareInterface
*
* @option boolean $debug Run command in debug mode
*
* @param string $siteish <site_name>, site UUID, or <site.env> for environment-specific secrets
* @param string $siteenv <site_name>, site UUID, or <site.env> for environment-specific secrets
* @param string $name The secret name
* @param array $options
*
Expand All @@ -39,12 +39,12 @@ class SiteDeleteCommand extends SecretBaseCommand implements SiteAwareInterface
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function deleteSecret($siteish, string $name, array $options = ['debug' => false])
public function deleteSecret($siteenv, string $name, array $options = ['debug' => false])
{
if (strpos($siteish, '.') !== false) {
list($site_id, $env_name) = explode('.', $siteish);
if (strpos($siteenv, '.') !== false) {
list($site_id, $env_name) = explode('.', $siteenv);
} else {
$site_id = $siteish;
$site_id = $siteenv;
$env_name = null;
}

Expand Down
10 changes: 5 additions & 5 deletions src/Commands/SiteSetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SiteSetCommand extends SecretBaseCommand implements SiteAwareInterface
* Multiple options should be specified in comma separated format. Ex: --scope=ic,web.
* @option boolean $debug Run command in debug mode
*
* @param string $siteish <site_name>, site UUID, or <site.env> for environment-specific secrets
* @param string $siteenv <site_name>, site UUID, or <site.env> for environment-specific secrets
* @param string $name The secret name
* @param string $value The secret value
* @param array $options
Expand All @@ -43,16 +43,16 @@ class SiteSetCommand extends SecretBaseCommand implements SiteAwareInterface
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function setSecret($siteish, string $name, string $value, array $options = [
public function setSecret($siteenv, string $name, string $value, array $options = [
'type' => null,
'scope' => null,
'debug' => false,
])
{
if (strpos($siteish, '.') !== false) {
list($site_id, $env_name) = explode('.', $siteish);
if (strpos($siteenv, '.') !== false) {
list($site_id, $env_name) = explode('.', $siteenv);
} else {
$site_id = $siteish;
$site_id = $siteenv;
$env_name = null;
}

Expand Down

0 comments on commit cbbc0d1

Please sign in to comment.