You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.go 1006B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Copyright 2016 The Gitea Authors. All rights reserved.
  3. // Use of this source code is governed by a MIT-style
  4. // license that can be found in the LICENSE file.
  5. // Gitea (git with a cup of tea) is a painless self-hosted Git Service.
  6. package main // import "code.gitea.io/gitea"
  7. import (
  8. "os"
  9. "code.gitea.io/gitea/cmd"
  10. "code.gitea.io/gitea/modules/log"
  11. "code.gitea.io/gitea/modules/setting"
  12. "github.com/urfave/cli"
  13. )
  14. // Version holds the current Gitea version
  15. var Version = "1.1.0+dev"
  16. func init() {
  17. setting.AppVer = Version
  18. }
  19. func main() {
  20. app := cli.NewApp()
  21. app.Name = "Gitea"
  22. app.Usage = "A painless self-hosted Git service"
  23. app.Version = Version
  24. app.Commands = []cli.Command{
  25. cmd.CmdWeb,
  26. cmd.CmdServ,
  27. cmd.CmdHook,
  28. cmd.CmdDump,
  29. cmd.CmdCert,
  30. cmd.CmdAdmin,
  31. }
  32. app.Flags = append(app.Flags, []cli.Flag{}...)
  33. err := app.Run(os.Args)
  34. if err != nil {
  35. log.Fatal(4, "Failed to run app with %s: %v", os.Args, err)
  36. }
  37. }