gogs.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2013-2014 gogs authors.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License"): you may
  4. // not use this file except in compliance with the License. You may obtain
  5. // a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. // License for the specific language governing permissions and limitations
  13. // under the License.
  14. // gogs(Go Git Service) is a Go clone of Github.
  15. package main
  16. import (
  17. "os"
  18. "runtime"
  19. "github.com/codegangsta/cli"
  20. )
  21. // +build go1.1
  22. // Test that go1.1 tag above is included in builds. main.go refers to this definition.
  23. const go11tag = true
  24. const APP_VER = "0.0.0.0218"
  25. func init() {
  26. runtime.GOMAXPROCS(runtime.NumCPU())
  27. }
  28. func main() {
  29. app := cli.NewApp()
  30. app.Name = "gogs"
  31. app.Usage = "Go Git Service"
  32. app.Version = APP_VER
  33. app.Commands = []cli.Command{
  34. CmdWeb,
  35. CmdServ,
  36. }
  37. app.Flags = append(app.Flags, []cli.Flag{
  38. cli.BoolFlag{"noterm", "disable color output"},
  39. }...)
  40. app.Run(os.Args)
  41. }