Add build tag enable prompt

pull/197/head
Unknown 11 years ago
parent 0e41726ece
commit 8bed017557
  1. 2
      conf/app.ini
  2. 6
      modules/base/conf.go
  3. 1
      modules/middleware/repo.go
  4. 5
      routers/install.go
  5. 2
      templates/repo/single_list.tmpl

@ -22,7 +22,7 @@ CERT_FILE = cert.pem
KEY_FILE = key.pem
[database]
; Either "mysql", "postgres" or "sqlite3"(binary release only), it's your choice
; Either "mysql", "postgres" or "sqlite3", it's your choice
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gogs

@ -174,6 +174,12 @@ func newLogService() {
func newCacheService() {
CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory")
if cache.EnableRedis {
log.Info("Redis Enabled")
}
if cache.EnableMemcache {
log.Info("Memcache Enabled")
}
switch CacheAdapter {
case "memory":

@ -201,6 +201,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
// repo is bare and display enable
if displayBare && ctx.Repo.Repository.IsBare {
log.Debug("Bare repository: %s", ctx.Repo.RepoLink)
ctx.HTML(200, "repo/single_bare")
return
}

@ -49,6 +49,7 @@ func GlobalInit() {
models.LoadModelsConfig()
models.LoadRepoConfig()
models.NewRepoContext()
NewServices()
if base.InstallLock {
if err := models.NewEngine(); err != nil {
@ -56,9 +57,11 @@ func GlobalInit() {
}
models.HasEngine = true
if models.EnableSQLite3 {
log.Info("SQLite3 Enabled")
}
cron.NewCronContext()
}
NewServices()
checkRunMode()
}

@ -36,7 +36,7 @@
</span>
</td>
<td class="text">
<span class="wrap"><a href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
<span class="wrap"><a rel="nofollow" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
</td>
<td class="date">
<span class="wrap">{{TimeSince $commit.Committer.When}}</span>

Loading…
Cancel
Save