command/push: support custom endpoints
This commit is contained in:
parent
2f65b1bb67
commit
6bd8c6ca79
|
@ -58,8 +58,16 @@ func (c *PushCommand) Run(args []string) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build our client
|
// Build our client
|
||||||
c.client = harmony.DefaultClient()
|
|
||||||
defer func() { c.client = nil }()
|
defer func() { c.client = nil }()
|
||||||
|
c.client = harmony.DefaultClient()
|
||||||
|
if tpl.Push.Address != "" {
|
||||||
|
c.client, err = harmony.NewClient(tpl.Push.Address)
|
||||||
|
if err != nil {
|
||||||
|
c.Ui.Error(fmt.Sprintf(
|
||||||
|
"Error setting up API client: %s", err))
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Build the archiving options
|
// Build the archiving options
|
||||||
var opts archive.ArchiveOpts
|
var opts archive.ArchiveOpts
|
||||||
|
|
|
@ -45,6 +45,7 @@ type Template struct {
|
||||||
// PushConfig is the configuration structure for the push settings.
|
// PushConfig is the configuration structure for the push settings.
|
||||||
type PushConfig struct {
|
type PushConfig struct {
|
||||||
Name string
|
Name string
|
||||||
|
Address string
|
||||||
BaseDir string
|
BaseDir string
|
||||||
Include []string
|
Include []string
|
||||||
Exclude []string
|
Exclude []string
|
||||||
|
|
Loading…
Reference in New Issue