summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-05-12 14:32:28 -0400
committerUnknwon <u@gogs.io>2016-05-12 14:32:28 -0400
commit7826eae452360913b7c9e476566dc30601270c75 (patch)
treec0062ef2ed630c280fc4919f6d645a1aee87aed6
parent8a2347592d78548a54e35a71eb379ae3b8810bc6 (diff)
downloadgitea-7826eae452360913b7c9e476566dc30601270c75.tar.gz
gitea-7826eae452360913b7c9e476566dc30601270c75.zip
#3045 fix DEPRECATED Action signature erorr
-rw-r--r--README.md2
-rw-r--r--cmd/cert.go4
-rw-r--r--cmd/cert_stub.go4
-rw-r--r--cmd/dump.go14
-rw-r--r--cmd/serve.go8
-rw-r--r--cmd/update.go6
-rw-r--r--cmd/web.go4
-rw-r--r--glide.lock2
-rw-r--r--gogs.go2
-rw-r--r--templates/.VERSION2
10 files changed, 30 insertions, 18 deletions
diff --git a/README.md b/README.md
index 55f98809f3..f56dc33a18 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
-##### Current version: 0.9.26
+##### Current version: 0.9.27
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
diff --git a/cmd/cert.go b/cmd/cert.go
index 7b68f330ec..cd6972ea86 100644
--- a/cmd/cert.go
+++ b/cmd/cert.go
@@ -67,7 +67,7 @@ func pemBlockForKey(priv interface{}) *pem.Block {
}
}
-func runCert(ctx *cli.Context) {
+func runCert(ctx *cli.Context) error {
if len(ctx.String("host")) == 0 {
log.Fatal("Missing required --host parameter")
}
@@ -158,4 +158,6 @@ func runCert(ctx *cli.Context) {
pem.Encode(keyOut, pemBlockForKey(priv))
keyOut.Close()
log.Println("Written key.pem")
+
+ return nil
}
diff --git a/cmd/cert_stub.go b/cmd/cert_stub.go
index f848e246c6..78e84e8c04 100644
--- a/cmd/cert_stub.go
+++ b/cmd/cert_stub.go
@@ -20,7 +20,9 @@ var CmdCert = cli.Command{
Action: runCert,
}
-func runCert(ctx *cli.Context) {
+func runCert(ctx *cli.Context) error {
fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
os.Exit(1)
+
+ return nil
}
diff --git a/cmd/dump.go b/cmd/dump.go
index 90082667bb..0a2f4e9cba 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -32,7 +32,7 @@ It can be used for backup and capture Gogs server image to send to maintainer`,
},
}
-func runDump(ctx *cli.Context) {
+func runDump(ctx *cli.Context) error {
if ctx.IsSet("config") {
setting.CustomConf = ctx.String("config")
}
@@ -68,21 +68,21 @@ func runDump(ctx *cli.Context) {
log.Fatalf("Fail to create %s: %v", fileName, err)
}
- if err := z.AddFile("gogs-repo.zip", reposDump); err !=nil {
+ if err := z.AddFile("gogs-repo.zip", reposDump); err != nil {
log.Fatalf("Fail to include gogs-repo.zip: %v", err)
}
- if err := z.AddFile("gogs-db.sql", dbDump); err !=nil {
+ if err := z.AddFile("gogs-db.sql", dbDump); err != nil {
log.Fatalf("Fail to include gogs-db.sql: %v", err)
}
customDir, err := os.Stat(setting.CustomPath)
if err == nil && customDir.IsDir() {
- if err := z.AddDir("custom", setting.CustomPath); err !=nil {
+ if err := z.AddDir("custom", setting.CustomPath); err != nil {
log.Fatalf("Fail to include custom: %v", err)
- }
+ }
} else {
log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath)
}
- if err := z.AddDir("log", setting.LogRootPath); err !=nil {
+ if err := z.AddDir("log", setting.LogRootPath); err != nil {
log.Fatalf("Fail to include log: %v", err)
}
// FIXME: SSH key file.
@@ -94,4 +94,6 @@ func runDump(ctx *cli.Context) {
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
os.RemoveAll(TmpWorkDir)
log.Printf("Finish dumping in file %s", fileName)
+
+ return nil
}
diff --git a/cmd/serve.go b/cmd/serve.go
index 83d8f8763a..2759e1b575 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -129,7 +129,7 @@ func handleUpdateTask(uuid string, user, repoUser *models.User, reponame string,
}
}
-func runServ(c *cli.Context) {
+func runServ(c *cli.Context) error {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
@@ -138,7 +138,7 @@ func runServ(c *cli.Context) {
if setting.SSH.Disabled {
println("Gogs: SSH has been disabled")
- return
+ return nil
}
if len(c.Args()) < 1 {
@@ -149,7 +149,7 @@ func runServ(c *cli.Context) {
if len(cmd) == 0 {
println("Hi there, You've successfully authenticated, but Gogs does not provide shell access.")
println("If this is unexpected, please log in with password and setup Gogs under another user.")
- return
+ return nil
}
verb, args := parseCmd(cmd)
@@ -290,4 +290,6 @@ func runServ(c *cli.Context) {
fail("Internal error", "UpdatePublicKey: %v", err)
}
}
+
+ return nil
}
diff --git a/cmd/update.go b/cmd/update.go
index aca2a7cbe7..08d5d89e10 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -24,7 +24,7 @@ var CmdUpdate = cli.Command{
},
}
-func runUpdate(c *cli.Context) {
+func runUpdate(c *cli.Context) error {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
@@ -33,7 +33,7 @@ func runUpdate(c *cli.Context) {
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty")
- return
+ return nil
}
args := c.Args()
@@ -53,4 +53,6 @@ func runUpdate(c *cli.Context) {
if err := models.AddUpdateTask(&task); err != nil {
log.GitLogger.Fatal(2, "AddUpdateTask: %v", err)
}
+
+ return nil
}
diff --git a/cmd/web.go b/cmd/web.go
index 1378cc3eca..07c64646c1 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -175,7 +175,7 @@ func newMacaron() *macaron.Macaron {
return m
}
-func runWeb(ctx *cli.Context) {
+func runWeb(ctx *cli.Context) error {
if ctx.IsSet("config") {
setting.CustomConf = ctx.String("config")
}
@@ -585,4 +585,6 @@ func runWeb(ctx *cli.Context) {
if err != nil {
log.Fatal(4, "Fail to start server: %v", err)
}
+
+ return nil
}
diff --git a/glide.lock b/glide.lock
index 88cd9a7c36..3f4306291d 100644
--- a/glide.lock
+++ b/glide.lock
@@ -6,7 +6,7 @@ imports:
subpackages:
- memcache
- name: github.com/codegangsta/cli
- version: aca5b047ed14d17224157c3434ea93bf6cdaadee
+ version: 7f0ca9a34958d6702ac8f38530d19001fa5b1560
- name: github.com/go-macaron/binding
version: a68f34212fe257219981e43adfe4c96ab48f42cd
- name: github.com/go-macaron/cache
diff --git a/gogs.go b/gogs.go
index 6f9a705bef..2941012263 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.9.26.0511"
+const APP_VER = "0.9.27.0512"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/templates/.VERSION b/templates/.VERSION
index 91642fde8d..3821321969 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.9.26.0511 \ No newline at end of file
+0.9.27.0512 \ No newline at end of file