Skip to content

Commit

Permalink
Add options for mac-arm to workspace commands, ignore saved existing …
Browse files Browse the repository at this point in the history
…scaffold-tokens
  • Loading branch information
stmh committed Feb 4, 2022
1 parent ff9aec5 commit 1dafe0e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
9 changes: 6 additions & 3 deletions config/scaffold/mbb/fabfile.local.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{% set remote_host = platform == 'mac' ? 'docker.for.mac.localhost' : '172.17.0.1' %}
{% set is_mac = platform == 'mac-intel' or platform == 'mac-arm' %}
dockerHosts:
mbb:
runLocally: true
rootFolder: {{ rootFolder }}/projects
{% if platform == 'mac' %}
{% if is_mac %}
environment:
COMPOSE_FILE: "docker-compose.yml:docker-compose-mbb.yml:../../docker-compose-nfs.yml"
{% endif %}

hosts:
mbb:
docker:
useNfs: {{ (platform == 'mac') ? "true" : "false" }}
useNfs: {{ (is_mac) ? "true" : "false" }}
useArm: {{ (platform == 'mac-arm') ? "true" : "false" }}
xdebug:
remote_host: {{ remote_host }}
blueprint:
xdebug:
remote_host: {{ remote_host }}
docker:
useNfs: {{ (platform == 'mac') ? "true" : "false" }}
useNfs: {{ (is_mac) ? "true" : "false" }}
useArm: {{ (platform == 'mac-arm') ? "true" : "false" }}


7 changes: 4 additions & 3 deletions config/scaffold/mbb/mbb-base.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
questions:
platform:
question: "What platform are you working on (mac|linux)"
question: "What platform are you working on (mac-intel|mac-arm|linux)"
type: choices
default: mac
default: mac-intel
choices:
- mac
- mac-intel
- mac-arm
- linux
branch:
question: "What branch should I use to checkout?"
Expand Down
4 changes: 3 additions & 1 deletion src/Command/WorkspaceCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$url = $this->scaffolder->getLocalScaffoldFile('mbb/mbb.yml');
$root_folder = empty($input->getOption('output')) ? getcwd() : $input->getOption('output');

$result = $this->scaffold($url, $root_folder, $context, [], new Options());
$options = new Options();
$options->setUseCacheTokens(false);
$result = $this->scaffold($url, $root_folder, $context, [], $options);
return $result->getExitCode();
}
}
4 changes: 3 additions & 1 deletion src/Command/WorkspaceUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ protected function execute(InputInterface $input, OutputInterface $output)

$name = basename($root_folder);
$root_folder = dirname($root_folder);
$this->scaffold($url, $root_folder, $context, ['name' => $name], new Options());
$options = new Options();
$options->setUseCacheTokens(false);
$this->scaffold($url, $root_folder, $context, ['name' => $name], $options);
return 0;
}

Expand Down

0 comments on commit 1dafe0e

Please sign in to comment.