2020-02-19 05:18:36 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2020-02-20 05:46:44 +00:00
|
|
|
"gitea.com/jolheiser/gpm/modules/config"
|
2020-02-19 05:18:36 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Export = cli.Command{
|
|
|
|
Name: "export",
|
2020-02-19 16:48:55 +00:00
|
|
|
Usage: "Export JSON for local packages",
|
2020-02-19 05:18:36 +00:00
|
|
|
Action: doExport,
|
|
|
|
}
|
|
|
|
|
|
|
|
func doExport(ctx *cli.Context) error {
|
|
|
|
|
2020-02-19 05:39:54 +00:00
|
|
|
export, err := config.Export()
|
2020-02-19 05:18:36 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2020-02-19 05:39:54 +00:00
|
|
|
fmt.Println(export)
|
2020-02-19 05:18:36 +00:00
|
|
|
return nil
|
|
|
|
}
|