mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-17 13:37:26 +03:00
cli : add a function to accept logger as parameter for deploy function
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8195 GitOrigin-RevId: 745bcae76e0f0c2a9ca2fc6dec06e39cd7b05f40
This commit is contained in:
parent
116c290288
commit
1f2212a82f
@ -2,10 +2,12 @@ package deploy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
"io"
|
||||
)
|
||||
|
||||
type ProjectDeploy struct {
|
||||
@ -42,6 +44,12 @@ func WithCliExtPath(path string) ProjectDeployOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithLogger(logger *logrus.Logger) ProjectDeployOption {
|
||||
return func(p *ProjectDeploy) {
|
||||
p.ec.Logger = logger
|
||||
}
|
||||
}
|
||||
|
||||
func NewProjectDeploy(projectDirectory string, opts ...ProjectDeployOption) (*ProjectDeploy, error) {
|
||||
var op errors.Op = "deploy.NewProjectDeploy"
|
||||
ec := cli.NewExecutionContext()
|
||||
|
Loading…
Reference in New Issue
Block a user