Add support for provisioning and rebuilding via interface
This commit is contained in:
parent
f5c5999f44
commit
ddb4bb3546
76 changed files with 1306 additions and 625 deletions
|
|
@ -1,10 +1,14 @@
|
|||
package drush
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/barrel"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/mstore"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/php"
|
||||
"github.com/tkw1536/pkglib/stream"
|
||||
)
|
||||
|
||||
// Drush implements commands related to drush
|
||||
|
|
@ -16,3 +20,13 @@ type Drush struct {
|
|||
PHP *php.PHP
|
||||
}
|
||||
}
|
||||
|
||||
// Enable enables the given drush modules
|
||||
func (drush *Drush) Enable(ctx context.Context, progress io.Writer, modules ...string) error {
|
||||
return drush.Exec(ctx, progress, append([]string{"pm-enable", "--yes"}, modules...)...)
|
||||
}
|
||||
|
||||
func (drush *Drush) Exec(ctx context.Context, progress io.Writer, command ...string) error {
|
||||
script := append([]string{"drush"}, command...)
|
||||
return drush.Dependencies.Barrel.ShellScript(ctx, stream.NonInteractive(progress), script...)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue