Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func (c buildConfig) buildOptions() (oo []fn.BuildOption, err error) {
if c.Platform != "" {
parts := strings.Split(c.Platform, "/")
if len(parts) != 2 {
return oo, fmt.Errorf("the value for --patform must be in the form [OS]/[Architecture]. eg \"linux/amd64\"")
return oo, fmt.Errorf("the value for --platform must be in the form [OS]/[Architecture]. eg \"linux/amd64\"")
}
oo = append(oo, fn.BuildWithPlatforms([]fn.Platform{{OS: parts[0], Architecture: parts[1]}}))
}
Expand Down
292 changes: 0 additions & 292 deletions cmd/ci/config.go

This file was deleted.

40 changes: 0 additions & 40 deletions cmd/ci/workflow_test.go

This file was deleted.

2 changes: 2 additions & 0 deletions cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/ory/viper"
"knative.dev/func/pkg/ci/github"
"knative.dev/func/pkg/keda"

"knative.dev/func/cmd/prompt"
Expand Down Expand Up @@ -78,6 +79,7 @@ func NewClient(cfg ClientConfig, options ...fn.Option) (*fn.Client, func()) {
docker.WithCredentialsProvider(c),
docker.WithTransport(t),
docker.WithVerbose(cfg.Verbose))),
fn.WithCI(github.NewWorkflowGenerator(cfg.Verbose)),
}
)

Expand Down
13 changes: 9 additions & 4 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"

"knative.dev/func/cmd/ci"
"knative.dev/func/cmd/common"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)

func NewConfigCmd(
loaderSaver common.FunctionLoaderSaver,
writer ci.WorkflowWriter,
pathWriter fn.PathWriter,
currentBranch common.CurrentBranchFunc,
workingDir common.WorkDirFunc,
newClient ClientFactory,
Expand Down Expand Up @@ -47,8 +46,14 @@ or from the directory specified with --path.
cmd.AddCommand(NewConfigEnvsCmd(loaderSaver))
cmd.AddCommand(NewConfigVolumesCmd())

if os.Getenv(ci.ConfigCIFeatureFlag) == "true" {
cmd.AddCommand(NewConfigCICmd(loaderSaver, writer, currentBranch, workingDir))
if os.Getenv(ConfigCIFeatureFlag) == "true" {
cmd.AddCommand(NewConfigCICmd(
loaderSaver,
pathWriter,
currentBranch,
workingDir,
newClient,
))
}

return cmd
Expand Down
Loading
Loading