mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
#3045 fix DEPRECATED Action signature erorr
This commit is contained in:
parent
8a2347592d
commit
7826eae452
10 changed files with 30 additions and 18 deletions
|
@ -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)
|
![](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 |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
|
|
@ -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 {
|
if len(ctx.String("host")) == 0 {
|
||||||
log.Fatal("Missing required --host parameter")
|
log.Fatal("Missing required --host parameter")
|
||||||
}
|
}
|
||||||
|
@ -158,4 +158,6 @@ func runCert(ctx *cli.Context) {
|
||||||
pem.Encode(keyOut, pemBlockForKey(priv))
|
pem.Encode(keyOut, pemBlockForKey(priv))
|
||||||
keyOut.Close()
|
keyOut.Close()
|
||||||
log.Println("Written key.pem")
|
log.Println("Written key.pem")
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,9 @@ var CmdCert = cli.Command{
|
||||||
Action: runCert,
|
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.")
|
fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -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") {
|
if ctx.IsSet("config") {
|
||||||
setting.CustomConf = ctx.String("config")
|
setting.CustomConf = ctx.String("config")
|
||||||
}
|
}
|
||||||
|
@ -94,4 +94,6 @@ func runDump(ctx *cli.Context) {
|
||||||
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
|
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
|
||||||
os.RemoveAll(TmpWorkDir)
|
os.RemoveAll(TmpWorkDir)
|
||||||
log.Printf("Finish dumping in file %s", fileName)
|
log.Printf("Finish dumping in file %s", fileName)
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -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") {
|
if c.IsSet("config") {
|
||||||
setting.CustomConf = c.String("config")
|
setting.CustomConf = c.String("config")
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ func runServ(c *cli.Context) {
|
||||||
|
|
||||||
if setting.SSH.Disabled {
|
if setting.SSH.Disabled {
|
||||||
println("Gogs: SSH has been disabled")
|
println("Gogs: SSH has been disabled")
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(c.Args()) < 1 {
|
if len(c.Args()) < 1 {
|
||||||
|
@ -149,7 +149,7 @@ func runServ(c *cli.Context) {
|
||||||
if len(cmd) == 0 {
|
if len(cmd) == 0 {
|
||||||
println("Hi there, You've successfully authenticated, but Gogs does not provide shell access.")
|
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.")
|
println("If this is unexpected, please log in with password and setup Gogs under another user.")
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
verb, args := parseCmd(cmd)
|
verb, args := parseCmd(cmd)
|
||||||
|
@ -290,4 +290,6 @@ func runServ(c *cli.Context) {
|
||||||
fail("Internal error", "UpdatePublicKey: %v", err)
|
fail("Internal error", "UpdatePublicKey: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ var CmdUpdate = cli.Command{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func runUpdate(c *cli.Context) {
|
func runUpdate(c *cli.Context) error {
|
||||||
if c.IsSet("config") {
|
if c.IsSet("config") {
|
||||||
setting.CustomConf = c.String("config")
|
setting.CustomConf = c.String("config")
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ func runUpdate(c *cli.Context) {
|
||||||
|
|
||||||
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
|
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
|
||||||
log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty")
|
log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty")
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
args := c.Args()
|
args := c.Args()
|
||||||
|
@ -53,4 +53,6 @@ func runUpdate(c *cli.Context) {
|
||||||
if err := models.AddUpdateTask(&task); err != nil {
|
if err := models.AddUpdateTask(&task); err != nil {
|
||||||
log.GitLogger.Fatal(2, "AddUpdateTask: %v", err)
|
log.GitLogger.Fatal(2, "AddUpdateTask: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ func newMacaron() *macaron.Macaron {
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func runWeb(ctx *cli.Context) {
|
func runWeb(ctx *cli.Context) error {
|
||||||
if ctx.IsSet("config") {
|
if ctx.IsSet("config") {
|
||||||
setting.CustomConf = ctx.String("config")
|
setting.CustomConf = ctx.String("config")
|
||||||
}
|
}
|
||||||
|
@ -585,4 +585,6 @@ func runWeb(ctx *cli.Context) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(4, "Fail to start server: %v", err)
|
log.Fatal(4, "Fail to start server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
2
glide.lock
generated
2
glide.lock
generated
|
@ -6,7 +6,7 @@ imports:
|
||||||
subpackages:
|
subpackages:
|
||||||
- memcache
|
- memcache
|
||||||
- name: github.com/codegangsta/cli
|
- name: github.com/codegangsta/cli
|
||||||
version: aca5b047ed14d17224157c3434ea93bf6cdaadee
|
version: 7f0ca9a34958d6702ac8f38530d19001fa5b1560
|
||||||
- name: github.com/go-macaron/binding
|
- name: github.com/go-macaron/binding
|
||||||
version: a68f34212fe257219981e43adfe4c96ab48f42cd
|
version: a68f34212fe257219981e43adfe4c96ab48f42cd
|
||||||
- name: github.com/go-macaron/cache
|
- name: github.com/go-macaron/cache
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.26.0511"
|
const APP_VER = "0.9.27.0512"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.9.26.0511
|
0.9.27.0512
|
Loading…
Reference in a new issue