Add option to provide configuration file on command line
This commit is contained in:
parent
02c5bade0f
commit
1ab09e4f1b
8 changed files with 37 additions and 13 deletions
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
const (
|
||||
// "### autogenerated by gitgos, DO NOT EDIT\n"
|
||||
_TPL_PUBLICK_KEY = `command="%s serv key-%d",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n"
|
||||
_TPL_PUBLICK_KEY = `command="%s serv --config=%s key-%d",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -98,7 +98,7 @@ func (k *PublicKey) OmitEmail() string {
|
|||
|
||||
// GetAuthorizedString generates and returns formatted public key string for authorized_keys file.
|
||||
func (key *PublicKey) GetAuthorizedString() string {
|
||||
return fmt.Sprintf(_TPL_PUBLICK_KEY, appPath, key.Id, key.Content)
|
||||
return fmt.Sprintf(_TPL_PUBLICK_KEY, appPath, setting.CustomConf, key.Id, key.Content)
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
TPL_UPDATE_HOOK = "#!/usr/bin/env %s\n%s update $1 $2 $3\n"
|
||||
TPL_UPDATE_HOOK = "#!/usr/bin/env %s\n%s update --config=%s $1 $2 $3\n"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -424,7 +424,7 @@ func initRepository(f string, u *User, repo *Repository, initReadme bool, repoLa
|
|||
|
||||
// hook/post-update
|
||||
if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"),
|
||||
fmt.Sprintf(TPL_UPDATE_HOOK, setting.ScriptType, "\""+appPath+"\"")); err != nil {
|
||||
fmt.Sprintf(TPL_UPDATE_HOOK, setting.ScriptType, "\""+appPath+"\"", setting.CustomConf)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue