2020-02-14 21:46:02 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-05-07 03:09:31 +02:00
|
|
|
"os"
|
|
|
|
|
2020-02-17 21:50:02 +01:00
|
|
|
"gitea.com/jolheiser/sip/cmd"
|
2020-05-07 03:09:31 +02:00
|
|
|
|
2020-02-14 21:46:02 +01:00
|
|
|
"github.com/urfave/cli/v2"
|
2020-02-27 03:53:11 +01:00
|
|
|
"go.jolheiser.com/beaver"
|
2020-02-14 21:46:02 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var Version = "develop"
|
|
|
|
|
|
|
|
func main() {
|
2020-02-18 06:27:52 +01:00
|
|
|
|
|
|
|
// config loads on init
|
|
|
|
|
2020-02-14 21:46:02 +01:00
|
|
|
app := cli.NewApp()
|
2020-02-17 21:50:02 +01:00
|
|
|
app.Name = "Sip"
|
2020-02-14 21:46:02 +01:00
|
|
|
app.Usage = "Command line tool to interact with Gitea"
|
|
|
|
app.Version = Version
|
|
|
|
app.Commands = []*cli.Command{
|
2020-02-16 06:51:14 +01:00
|
|
|
&cmd.Config,
|
2020-02-18 03:57:51 +01:00
|
|
|
&cmd.Tokens,
|
2020-02-14 21:46:02 +01:00
|
|
|
&cmd.Repo,
|
|
|
|
&cmd.Issues,
|
2020-02-14 22:18:13 +01:00
|
|
|
&cmd.Pulls,
|
2020-04-17 05:59:12 +02:00
|
|
|
&cmd.Release,
|
2020-09-13 06:34:11 +02:00
|
|
|
&cmd.Open,
|
2020-02-14 21:46:02 +01:00
|
|
|
}
|
|
|
|
app.Flags = cmd.Flags
|
|
|
|
app.EnableBashCompletion = true
|
|
|
|
err := app.Run(os.Args)
|
|
|
|
if err != nil {
|
2020-02-16 23:31:01 +01:00
|
|
|
beaver.Error(err)
|
2020-02-14 21:46:02 +01:00
|
|
|
}
|
|
|
|
}
|