summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-26 09:22:08 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-26 09:22:08 -0400
commit7ab94fe816bd726c995f2937a040c3d8c7898205 (patch)
treefcf84c1e759c158f461af3cc9f7236443f4992d6
parent409e4cde7a379bbdbe53367b3726f64b80aed0eb (diff)
downloadgitea-7ab94fe816bd726c995f2937a040c3d8c7898205.tar.gz
gitea-7ab94fe816bd726c995f2937a040c3d8c7898205.zip
Fix issue on windows
-rw-r--r--README.md2
-rw-r--r--README_ZH.md2
-rw-r--r--gogs.go2
-rw-r--r--models/repo.go3
-rw-r--r--modules/base/conf.go2
-rw-r--r--update.go26
6 files changed, 19 insertions, 18 deletions
diff --git a/README.md b/README.md
index c708bf55c8..b7396e5f47 100644
--- 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).
diff --git a/README_ZH.md b/README_ZH.md
index ee9c3b7c42..9c9f4b3980 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -29,7 +29,7 @@ Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依
- 用户个人信息页面
- 仓库浏览器
- Gravatar 以及缓存支持
-- 邮件服务(注册)
+- 邮件服务(注册、Issue)
- 管理员面板
- 支持 MySQL、PostgreSQL 以及 SQLite3(仅限二进制版本)
diff --git a/gogs.go b/gogs.go
index d88a2bc6f4..ba443c6e65 100644
--- 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
diff --git a/models/repo.go b/models/repo.go
index 477f9472b4..c80d2f2c2c 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -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
}
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 0fb1ccdcf6..2e56883937 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -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{
diff --git a/update.go b/update.go
index 5c6d5b28ce..39729937e1 100644
--- 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)
}