main.go 609 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Gogs is a painless self-hosted Git Service.
  2. package main
  3. import (
  4. "os"
  5. "github.com/urfave/cli"
  6. log "unknwon.dev/clog/v2"
  7. "gogs.io/gogs/internal/conf"
  8. )
  9. func init() {
  10. conf.App.Version = "0.15.0+dev"
  11. }
  12. func main() {
  13. app := cli.NewApp()
  14. app.Name = "Gogs"
  15. app.Usage = "A painless self-hosted Git service"
  16. app.Version = conf.App.Version
  17. app.Commands = []cli.Command{
  18. webCommand,
  19. servCommand,
  20. hookCommand,
  21. certCommand,
  22. adminCommand,
  23. importCommand,
  24. backupCommand,
  25. restoreCommand,
  26. }
  27. if err := app.Run(os.Args); err != nil {
  28. log.Fatal("Failed to start application: %v", err)
  29. }
  30. }