post-processor/vagrant-cloud: fix artifact

This commit is contained in:
Jack Pearkes 2014-06-25 12:49:44 -04:00
parent 46535e3a3c
commit e528cd7c8c
1 changed files with 6 additions and 7 deletions

View File

@ -2,19 +2,18 @@ package vagrantcloud
import (
"fmt"
"os"
)
const BuilderId = "pearkes.post-processor.vagrant-cloud"
type Artifact struct {
Path string
Tag string
Provider string
}
func NewArtifact(provider, path string) *Artifact {
func NewArtifact(provider, tag string) *Artifact {
return &Artifact{
Path: path,
Tag: tag,
Provider: provider,
}
}
@ -24,7 +23,7 @@ func (*Artifact) BuilderId() string {
}
func (a *Artifact) Files() []string {
return []string{a.Path}
return nil
}
func (a *Artifact) Id() string {
@ -32,9 +31,9 @@ func (a *Artifact) Id() string {
}
func (a *Artifact) String() string {
return fmt.Sprintf("'%s' provider box: %s", a.Provider, a.Path)
return fmt.Sprintf("'%s': %s", a.Provider, a.Tag)
}
func (a *Artifact) Destroy() error {
return os.Remove(a.Path)
return nil
}