app.Description=`By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
app.Description=`By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
app.Version=Version+formatBuiltWith()
app.Version=Version+formatBuiltWith()
app.EnableBashCompletion=true
app.EnableBashCompletion=true
app.Commands=[]cli.Command{
// these sub-commands need to use config file
subCmdWithIni:=[]cli.Command{
cmd.CmdWeb,
cmd.CmdWeb,
cmd.CmdServ,
cmd.CmdServ,
cmd.CmdHook,
cmd.CmdHook,
cmd.CmdDump,
cmd.CmdDump,
cmd.CmdCert,
cmd.CmdAdmin,
cmd.CmdAdmin,
cmd.CmdGenerate,
cmd.CmdMigrate,
cmd.CmdMigrate,
cmd.CmdKeys,
cmd.CmdKeys,
cmd.CmdConvert,
cmd.CmdConvert,
cmd.CmdDoctor,
cmd.CmdDoctor,
cmd.CmdManager,
cmd.CmdManager,
cmd.Cmdembedded,
cmd.CmdEmbedded,
cmd.CmdMigrateStorage,
cmd.CmdMigrateStorage,
cmd.CmdDocs,
cmd.CmdDumpRepository,
cmd.CmdDumpRepository,
cmd.CmdRestoreRepository,
cmd.CmdRestoreRepository,
cmd.CmdActions,
cmd.CmdActions,
cmdHelp,// TODO: the "help" sub-command was used to show the more information for "work path" and "custom config", in the future, it should avoid doing so
}
// these sub-commands do not need the config file, and they do not depend on any path or environment variable.
subCmdStandalone:=[]cli.Command{
cmd.CmdCert,
cmd.CmdGenerate,
cmd.CmdDocs,
}
}
// shared configuration flags, they are for global and for each sub-command at the same time
// shared configuration flags, they are for global and for each sub-command at the same time