]> source.dussan.org Git - gitea.git/commitdiff
Fix issue on windows
authorUnknown <joe2010xtmf@163.com>
Wed, 26 Mar 2014 13:22:08 +0000 (09:22 -0400)
committerUnknown <joe2010xtmf@163.com>
Wed, 26 Mar 2014 13:22:08 +0000 (09:22 -0400)
README.md
README_ZH.md
gogs.go
models/repo.go
modules/base/conf.go
update.go

index c708bf55c854793e03b454598a13a2442adb7976..b7396e5f47e99d82e265afd0fe2d7170bd5ba3f8 100644 (file)
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ More importantly, Gogs only needs one binary to setup your own project hosting o
 - User profile page.
 - Repository viewer.
 - Gravatar and cache support.
-- Mail service(register).
+- Mail service(register, issue).
 - Administration panel.
 - Supports MySQL, PostgreSQL and SQLite3(binary release only).
 
index ee9c3b7c4274f089e68238ae710118c8e9711041..9c9f4b3980c92ef3c6de228dd9934050081569e1 100644 (file)
@@ -29,7 +29,7 @@ Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依
 - 用户个人信息页面
 - 仓库浏览器
 - Gravatar 以及缓存支持
-- 邮件服务(注册)
+- 邮件服务(注册、Issue
 - 管理员面板
 - 支持 MySQL、PostgreSQL 以及 SQLite3(仅限二进制版本)
 
diff --git a/gogs.go b/gogs.go
index d88a2bc6f4a373d6a793e2a85cc319e208d40e78..ba443c6e650e7e73ec46cf38a6800b97bb5f70d9 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.1.8.0326"
+const APP_VER = "0.1.8.0326 Alpha"
 
 func init() {
        base.AppVer = APP_VER
index 477f9472b4ef40e3b0a9b616d7e05d4036723748..c80d2f2c2c8277b3875c37ca5d56eea6c7279eb5 100644 (file)
@@ -251,7 +251,8 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
        }
        defer pu.Close()
        // TODO: Windows .bat
-       if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n", appPath)); err != nil {
+       if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n",
+               strings.Replace(appPath, "\\", "/", -1))); err != nil {
                return err
        }
 
index 0fb1ccdcf660481498c08701a5b20762dc490f47..2e5688393773de4a775b5f93d7fa809e508b1433 100644 (file)
@@ -80,7 +80,7 @@ func ExecDir() (string, error) {
        if err != nil {
                return "", err
        }
-       return path.Dir(p), nil
+       return path.Dir(strings.Replace(p, "\\", "/", -1)), nil
 }
 
 var logLevels = map[string]string{
index 5c6d5b28ce172b13aec7ff40d28f1b34b343835f..39729937e1d6f1e4fea42d81db8aa07db29d7bfb 100644 (file)
--- a/update.go
+++ b/update.go
@@ -5,18 +5,18 @@
 package main
 
 import (
-"os"
-"os/exec"
-"strings"
-"strconv"
-"container/list"
-
-"github.com/codegangsta/cli"
-//"github.com/gogits/gogs/modules/log"
-"github.com/gogits/gogs/models"
-"github.com/gogits/gogs/modules/base"
-"github.com/qiniu/log"
-"github.com/gogits/git"
+       "container/list"
+       "os"
+       "os/exec"
+       "strconv"
+       "strings"
+
+       "github.com/codegangsta/cli"
+       //"github.com/gogits/gogs/modules/log"
+       "github.com/gogits/git"
+       "github.com/gogits/gogs/models"
+       "github.com/gogits/gogs/modules/base"
+       "github.com/qiniu/log"
 )
 
 var CmdUpdate = cli.Command{
@@ -103,7 +103,7 @@ func runUpdate(c *cli.Context) {
        // if a new branch
        if strings.HasPrefix(oldCommitId, "0000000") {
                l, err = ref.AllCommits()
-               
+
        } else {
                l = ref.CommitsBetween(newCommit, oldCommit)
        }