Browse Source

Mirror updates

tags/v1.2.0-rc1
Unknown 11 years ago
parent
commit
eda3f8b3b3
7 changed files with 34 additions and 22 deletions
  1. +11
    -12
      .gopmfile
  2. +2
    -0
      conf/app.ini
  3. +1
    -1
      gogs.go
  4. +1
    -1
      models/repo.go
  5. +11
    -8
      modules/base/conf.go
  6. +1
    -0
      routers/repo/repo.go
  7. +7
    -0
      templates/repo/setting.tmpl

+ 11
- 12
.gopmfile View File

@@ -2,24 +2,23 @@
path = github.com/gogits/gogs path = github.com/gogits/gogs


[deps] [deps]
github.com/Unknwon/cae =
github.com/Unknwon/com =
github.com/Unknwon/goconfig =
github.com/codegangsta/cli = github.com/codegangsta/cli =
github.com/go-martini/martini = github.com/go-martini/martini =
github.com/nfnt/resize =
github.com/lunny/xorm =
github.com/go-sql-driver/mysql = github.com/go-sql-driver/mysql =
github.com/go-xorm/xorm =
github.com/gogits/cache =
github.com/gogits/gfm =
github.com/gogits/git =
github.com/gogits/logs =
github.com/gogits/oauth2 =
github.com/gogits/session =
github.com/lib/pq = github.com/lib/pq =
github.com/nfnt/resize =
github.com/qiniu/log = github.com/qiniu/log =
github.com/robfig/cron = github.com/robfig/cron =
github.com/Unknwon/com =
github.com/Unknwon/cae =
github.com/Unknwon/goconfig =
github.com/gogits/logs =
github.com/gogits/binding =
github.com/gogits/git =
github.com/gogits/gfm =
github.com/gogits/cache =
github.com/gogits/session =
github.com/gogits/oauth2 =


[res] [res]
include = templates|public|conf include = templates|public|conf


+ 2
- 0
conf/app.ini View File

@@ -8,6 +8,7 @@ RUN_MODE = dev


[repository] [repository]
ROOT = ROOT =
SCRIPT_TYPE = bash
LANG_IGNS = Google Go|C|C++|Python|Ruby|C Sharp|Java|Objective-C LANG_IGNS = Google Go|C|C++|Python|Ruby|C Sharp|Java|Objective-C
LICENSES = Apache v2 License|GPL v2|MIT License|Affero GPL|Artistic License 2.0|BSD (3-Clause) License LICENSES = Apache v2 License|GPL v2|MIT License|Affero GPL|Artistic License 2.0|BSD (3-Clause) License


@@ -65,6 +66,7 @@ SEND_BUFFER_LEN = 10
SUBJECT = %(APP_NAME)s SUBJECT = %(APP_NAME)s
; Mail server ; Mail server
; Gmail: smtp.gmail.com:587 ; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:25
HOST = HOST =
; Mail from address ; Mail from address
FROM = FROM =


+ 1
- 1
gogs.go View File

@@ -19,7 +19,7 @@ import (
// Test that go1.2 tag above is included in builds. main.go refers to this definition. // Test that go1.2 tag above is included in builds. main.go refers to this definition.
const go12tag = true const go12tag = true


const APP_VER = "0.3.0.0418 Alpha"
const APP_VER = "0.3.0.0419 Alpha"


func init() { func init() {
base.AppVer = APP_VER base.AppVer = APP_VER


+ 1
- 1
models/repo.go View File

@@ -413,7 +413,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep


// hook/post-update // hook/post-update
if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"), if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"),
fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n",
fmt.Sprintf("#!/usr/bin/env %s\n%s update $1 $2 $3\n", base.ScriptType,
strings.Replace(appPath, "\\", "/", -1))); err != nil { strings.Replace(appPath, "\\", "/", -1))); err != nil {
return err return err
} }


+ 11
- 8
modules/base/conf.go View File

@@ -43,15 +43,17 @@ type Oauther struct {
} }


var ( var (
AppVer string
AppName string
AppLogo string
AppUrl string
IsProdMode bool
Domain string
SecretKey string
RunUser string
AppVer string
AppName string
AppLogo string
AppUrl string
IsProdMode bool
Domain string
SecretKey string
RunUser string

RepoRootPath string RepoRootPath string
ScriptType string


InstallLock bool InstallLock bool


@@ -310,6 +312,7 @@ func NewConfigContext() {
if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil { if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil {
qlog.Fatalf("Fail to create RepoRootPath(%s): %v\n", RepoRootPath, err) qlog.Fatalf("Fail to create RepoRootPath(%s): %v\n", RepoRootPath, err)
} }
ScriptType = Cfg.MustValue("repository", "SCRIPT_TYPE", "bash")
} }


func NewBaseServices() { func NewBaseServices() {


+ 1
- 0
routers/repo/repo.go View File

@@ -340,6 +340,7 @@ func SettingPost(ctx *middleware.Context) {
} }
ctx.Repo.Repository.Description = ctx.Query("desc") ctx.Repo.Repository.Description = ctx.Query("desc")
ctx.Repo.Repository.Website = ctx.Query("site") ctx.Repo.Repository.Website = ctx.Query("site")
ctx.Repo.Repository.IsPrivate = ctx.Query("private") == "on"
ctx.Repo.Repository.IsGoget = ctx.Query("goget") == "on" ctx.Repo.Repository.IsGoget = ctx.Query("goget") == "on"
if err := models.UpdateRepository(ctx.Repo.Repository); err != nil { if err := models.UpdateRepository(ctx.Repo.Repository); err != nil {
ctx.Handle(404, "repo.SettingPost(update)", err) ctx.Handle(404, "repo.SettingPost(update)", err)


+ 7
- 0
templates/repo/setting.tmpl View File

@@ -67,6 +67,13 @@
<div class="col-md-offset-3 col-md-9"> <div class="col-md-offset-3 col-md-9">
<div class="checkbox"> <div class="checkbox">
<label style="line-height: 15px;"> <label style="line-height: 15px;">
<input type="checkbox" name="private" {{if .Repository.IsPrivate}}checked{{end}}>
<strong>Make this repository private</strong>
</label>
</div>

<div class="checkbox">
<label style="line-height: 15px;">
<input type="checkbox" name="goget" {{if .Repository.IsGoget}}checked{{end}}> <input type="checkbox" name="goget" {{if .Repository.IsGoget}}checked{{end}}>
<strong>Enable 'go get' meta</strong> <strong>Enable 'go get' meta</strong>
</label> </label>


Loading…
Cancel
Save