summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-21 21:55:59 -0500
committerUnknwon <u@gogs.io>2016-02-21 21:55:59 -0500
commitc9516c4c60684d20c45e4c0c15911603dc9f20b3 (patch)
treee4afda4bf16392593a07ab8dcbc9ad71f32069a6
parent6e74dd4388dc41164e11491b38444cf6aa97f758 (diff)
downloadgitea-c9516c4c60684d20c45e4c0c15911603dc9f20b3.tar.gz
gitea-c9516c4c60684d20c45e4c0c15911603dc9f20b3.zip
Fix wrong place to check disable SSH
-rw-r--r--.bra.toml1
-rw-r--r--cmd/serve.go11
-rw-r--r--cmd/update.go2
-rw-r--r--gogs.go2
-rw-r--r--templates/.VERSION2
5 files changed, 10 insertions, 8 deletions
diff --git a/.bra.toml b/.bra.toml
index 569f99ef00..3829b45738 100644
--- a/.bra.toml
+++ b/.bra.toml
@@ -1,6 +1,7 @@
[run]
init_cmds = [
#["grep", "-rn", "FIXME", "."],
+ ["make", "build-dev"],
["./gogs", "web"]
]
watch_all = true
diff --git a/cmd/serve.go b/cmd/serve.go
index cca00b75cf..abfa46a241 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -42,11 +42,6 @@ func setup(logPath string) {
setting.NewContext()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
- if setting.DisableSSH {
- println("Gogs: SSH has been disabled")
- os.Exit(1)
- }
-
models.LoadConfigs()
if setting.UseSQLite3 || setting.UseTiDB {
@@ -138,8 +133,14 @@ func runServ(c *cli.Context) {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
+
setup("serv.log")
+ if setting.DisableSSH {
+ println("Gogs: SSH has been disabled")
+ return
+ }
+
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
}
diff --git a/cmd/update.go b/cmd/update.go
index 30f778f229..aca2a7cbe7 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -16,7 +16,7 @@ import (
var CmdUpdate = cli.Command{
Name: "update",
- Usage: "This command should only be called by SSH shell",
+ Usage: "This command should only be called by Git hook",
Description: `Update get pushed info and insert into database`,
Action: runUpdate,
Flags: []cli.Flag{
diff --git a/gogs.go b/gogs.go
index 78b601adb3..e506ce5c2d 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.8.41.0220"
+const APP_VER = "0.8.41.0221"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/templates/.VERSION b/templates/.VERSION
index 7f6bd55a1c..fc51561487 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.8.41.0220 \ No newline at end of file
+0.8.41.0221 \ No newline at end of file