gogs.go 799 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // +build go1.11
  2. // Copyright 2014 The Gogs 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. // Gogs is a painless self-hosted Git Service.
  6. package main
  7. import (
  8. "os"
  9. "github.com/urfave/cli"
  10. log "gopkg.in/clog.v1"
  11. "gogs.io/gogs/internal/cmd"
  12. "gogs.io/gogs/internal/setting"
  13. )
  14. const Version = "0.11.96.1026"
  15. func init() {
  16. setting.AppVer = Version
  17. }
  18. func main() {
  19. app := cli.NewApp()
  20. app.Name = "Gogs"
  21. app.Usage = "A painless self-hosted Git service"
  22. app.Version = Version
  23. app.Commands = []cli.Command{
  24. cmd.Web,
  25. cmd.Serv,
  26. cmd.Hook,
  27. cmd.Cert,
  28. cmd.Admin,
  29. cmd.Import,
  30. cmd.Backup,
  31. cmd.Restore,
  32. }
  33. if err := app.Run(os.Args); err != nil {
  34. log.Fatal(2, "Failed to run: %v", err)
  35. }
  36. }