Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
provision
Commits
538068fe
Commit
538068fe
authored
Sep 29, 2017
by
Jon Pugh
Browse files
Options
Downloads
Patches
Plain Diff
Use SiteContext to pull in all inputOptions in `bin/provision save` command
parent
aba638f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Command/SaveCommand.php
+5
-0
5 additions, 0 deletions
src/Command/SaveCommand.php
src/Context/SiteContext.php
+3
-2
3 additions, 2 deletions
src/Context/SiteContext.php
with
8 additions
and
2 deletions
src/Command/SaveCommand.php
+
5
−
0
View file @
538068fe
...
...
@@ -3,6 +3,7 @@
namespace
Aegir\Provision\Command
;
use
Aegir\Provision\Command
;
use
Aegir\Provision\Context\SiteContext
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Input\InputDefinition
;
use
Symfony\Component\Console\Input\InputOption
;
...
...
@@ -42,6 +43,10 @@ class SaveCommand extends Command
// @TODO: Load up all ProvisionContextTypes and inject their options.
// Load all SiteContext options
foreach
(
SiteContext
::
option_documentation
()
as
$option
=>
$description
)
{
$inputDefinition
[]
=
new
InputOption
(
$option
,
NULL
,
InputOption
::
VALUE_OPTIONAL
,
$description
);
}
return
new
InputDefinition
(
$inputDefinition
);
}
...
...
This diff is collapsed.
Click to expand it.
src/Context/SiteContext.php
+
3
−
2
View file @
538068fe
...
...
@@ -5,9 +5,10 @@ namespace Aegir\Provision\Context;
use
Aegir\Provision\Context
;
/**
* @file Provision named context site class.
* Class SiteContext
*
* @package Aegir\Provision\Context
*/
class
SiteContext
extends
Context
{
static
function
option_documentation
()
{
return
array
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment