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 1.0KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. "runtime"
  10. "code.gitea.io/gitea/modules/log"
  11. "code.gitea.io/gitea/cmd"
  12. "code.gitea.io/gitea/modules/setting"
  13. "github.com/urfave/cli"
  14. )
  15. // Version holds the current Gitea version
  16. var Version = "1.1.0+dev"
  17. func init() {
  18. runtime.GOMAXPROCS(runtime.NumCPU())
  19. setting.AppVer = Version
  20. }
  21. func main() {
  22. app := cli.NewApp()
  23. app.Name = "Gitea"
  24. app.Usage = "A painless self-hosted Git service"
  25. app.Version = Version
  26. app.Commands = []cli.Command{
  27. cmd.CmdWeb,
  28. cmd.CmdServ,
  29. cmd.CmdUpdate,
  30. cmd.CmdDump,
  31. cmd.CmdCert,
  32. cmd.CmdAdmin,
  33. }
  34. app.Flags = append(app.Flags, []cli.Flag{}...)
  35. err := app.Run(os.Args)
  36. if err != nil {
  37. log.Fatal(4, "Fail to run app with %s: %v", os.Args, err)
  38. }
  39. }