Commit 6bd8c6ca authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/push: support custom endpoints

parent 2f65b1bb
......@@ -58,8 +58,16 @@ func (c *PushCommand) Run(args []string) int {
}
// Build our client
c.client = harmony.DefaultClient()
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
var opts archive.ArchiveOpts
......
......@@ -45,6 +45,7 @@ type Template struct {
// PushConfig is the configuration structure for the push settings.
type PushConfig struct {
Name string
Address string
BaseDir string
Include []string
Exclude []string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment