]> source.dussan.org Git - gitea.git/commitdiff
Mirror updates
authorUnknown <joe2010xtmf@163.com>
Sat, 19 Apr 2014 10:00:08 +0000 (06:00 -0400)
committerUnknown <joe2010xtmf@163.com>
Sat, 19 Apr 2014 10:00:08 +0000 (06:00 -0400)
.gopmfile
conf/app.ini
gogs.go
models/repo.go
modules/base/conf.go
routers/repo/repo.go
templates/repo/setting.tmpl

index 79f98e02bdf6804eb7ddb096564fc840844d4b88..296d02367e2c3e9d42119a7d81171f31259b55d4 100644 (file)
--- a/.gopmfile
+++ b/.gopmfile
@@ -2,24 +2,23 @@
 path = github.com/gogits/gogs
 
 [deps]
+github.com/Unknwon/cae = 
+github.com/Unknwon/com = 
+github.com/Unknwon/goconfig = 
 github.com/codegangsta/cli = 
 github.com/go-martini/martini = 
-github.com/nfnt/resize = 
-github.com/lunny/xorm = 
 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/nfnt/resize = 
 github.com/qiniu/log = 
 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]
 include = templates|public|conf
index d805f822d69e49a277a44218c05ffe9f98ef6024..eb3d635f380b6182e34d0f8ef9b8f52508bd3855 100644 (file)
@@ -8,6 +8,7 @@ RUN_MODE = dev
 
 [repository]
 ROOT = 
+SCRIPT_TYPE = bash
 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
 
@@ -65,6 +66,7 @@ SEND_BUFFER_LEN = 10
 SUBJECT = %(APP_NAME)s
 ; Mail server
 ; Gmail: smtp.gmail.com:587
+; QQ: smtp.qq.com:25
 HOST = 
 ; Mail from address
 FROM = 
diff --git a/gogs.go b/gogs.go
index 65180754b5276bf5be860116c2a1ea66135af6ae..bc807c466c58809f100d49b7893c1fe1bba97d68 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -19,7 +19,7 @@ import (
 // Test that go1.2 tag above is included in builds. main.go refers to this definition.
 const go12tag = true
 
-const APP_VER = "0.3.0.0418 Alpha"
+const APP_VER = "0.3.0.0419 Alpha"
 
 func init() {
        base.AppVer = APP_VER
index 6943d05e0b0da90d81fb0b01400e214523d9efd6..486720d2700e4473fbda07ddac105bf51fabc705 100644 (file)
@@ -413,7 +413,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
 
        // hook/post-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 {
                return err
        }
index c5d73bbc581cbe3d4691e0dc360543853c402810..9dccc48f9d3a0a4d2cddb8a1331f3c339e5953f8 100644 (file)
@@ -43,15 +43,17 @@ type Oauther struct {
 }
 
 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
+       ScriptType   string
 
        InstallLock bool
 
@@ -310,6 +312,7 @@ func NewConfigContext() {
        if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil {
                qlog.Fatalf("Fail to create RepoRootPath(%s): %v\n", RepoRootPath, err)
        }
+       ScriptType = Cfg.MustValue("repository", "SCRIPT_TYPE", "bash")
 }
 
 func NewBaseServices() {
index 6422f0a324479d805c82fcf54239584c9101ac7d..f733378b3f264683512429531d61991e0e50be3a 100644 (file)
@@ -340,6 +340,7 @@ func SettingPost(ctx *middleware.Context) {
                }
                ctx.Repo.Repository.Description = ctx.Query("desc")
                ctx.Repo.Repository.Website = ctx.Query("site")
+               ctx.Repo.Repository.IsPrivate = ctx.Query("private") == "on"
                ctx.Repo.Repository.IsGoget = ctx.Query("goget") == "on"
                if err := models.UpdateRepository(ctx.Repo.Repository); err != nil {
                        ctx.Handle(404, "repo.SettingPost(update)", err)
index 5572671c93320aa4afcaf35dc52997cdd7647449..61621fe0e4bd9fa45fe4d38acd77609b3ec01b6d 100644 (file)
 
                     <div class="form-group">
                         <div class="col-md-offset-3 col-md-9">
+                            <div class="checkbox">
+                                <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}}>