wip (apply)
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"mirror-sync/pkg/client"
|
||||
"mirror-sync/pkg/project"
|
||||
"os"
|
||||
|
||||
@@ -18,7 +19,7 @@ type (
|
||||
func (*ApplyCmd) Name() string { return "apply" }
|
||||
func (*ApplyCmd) Synopsis() string { return "apply the current project settings" }
|
||||
func (*ApplyCmd) Usage() string {
|
||||
return `Usage: git-sync apply
|
||||
return `Usage: mirror-sync apply
|
||||
|
||||
apply the current project settings
|
||||
|
||||
@@ -35,8 +36,12 @@ func (p *ApplyCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
|
||||
fmt.Fprintf(os.Stderr, "error: %s\n", err)
|
||||
return subcommands.ExitFailure
|
||||
}
|
||||
|
||||
|
||||
|
||||
cli := client.New(projectConfig.ServerURL)
|
||||
if err := cli.Apply(projectConfig); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %s\n", err)
|
||||
return subcommands.ExitFailure
|
||||
}
|
||||
|
||||
return subcommands.ExitSuccess
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user