admin: New option to pass branch to use
This commit is contained in:
parent
f623699f56
commit
f5529ff72d
3 changed files with 25 additions and 5 deletions
|
@ -66,6 +66,7 @@ func main() {
|
|||
cloudPassword := ""
|
||||
localImporterDirectory := ""
|
||||
gitImporterRemote := ""
|
||||
gitImporterBranch := ""
|
||||
localImporterSymlink := false
|
||||
baseURL := "/"
|
||||
checkplugins := sync.CheckPluginList{}
|
||||
|
@ -113,6 +114,8 @@ func main() {
|
|||
"Copy files or just create symlink?")
|
||||
flag.StringVar(&gitImporterRemote, "git-import-remote", gitImporterRemote,
|
||||
"Remote URL of the git repository to use as synchronization source")
|
||||
flag.StringVar(&gitImporterBranch, "git-branch", gitImporterBranch,
|
||||
"Branch to use in the git repository")
|
||||
flag.StringVar(&cloudDAVBase, "clouddav", cloudDAVBase,
|
||||
"Base directory where found challenges files to import, cloud part")
|
||||
flag.StringVar(&cloudUsername, "clouduser", cloudUsername, "Username used to sync")
|
||||
|
@ -133,7 +136,7 @@ func main() {
|
|||
log.Fatal("Cannot have both --clouddav and --git-import-remote defined.")
|
||||
return
|
||||
} else if gitImporterRemote != "" {
|
||||
sync.GlobalImporter = sync.NewGitImporter(sync.LocalImporter{Base: localImporterDirectory, Symlink: localImporterSymlink}, gitImporterRemote)
|
||||
sync.GlobalImporter = sync.NewGitImporter(sync.LocalImporter{Base: localImporterDirectory, Symlink: localImporterSymlink}, gitImporterRemote, gitImporterBranch)
|
||||
} else if localImporterDirectory != "" {
|
||||
sync.GlobalImporter = sync.LocalImporter{Base: localImporterDirectory, Symlink: localImporterSymlink}
|
||||
} else if cloudDAVBase != "" {
|
||||
|
|
Reference in a new issue