Commit 12cf6650 authored by Chris Bednarski's avatar Chris Bednarski

Revert compress post-processor to master to get baseline test

parent f2f8ad16
...@@ -8,31 +8,37 @@ import ( ...@@ -8,31 +8,37 @@ import (
const BuilderId = "packer.post-processor.compress" const BuilderId = "packer.post-processor.compress"
type Artifact struct { type Artifact struct {
builderId string Path string
dir string Provider string
f []string
} }
func (a *Artifact) BuilderId() string { func NewArtifact(provider, path string) *Artifact {
return &Artifact{
Path: path,
Provider: provider,
}
}
func (*Artifact) BuilderId() string {
return BuilderId return BuilderId
} }
func (a *Artifact) Files() []string { func (self *Artifact) Id() string {
return a.f return ""
} }
func (*Artifact) Id() string { func (self *Artifact) Files() []string {
return "COMPRESS" return []string{self.Path}
} }
func (a *Artifact) String() string { func (self *Artifact) String() string {
return fmt.Sprintf("VM compressed files in directory: %s", a.dir) return fmt.Sprintf("'%s' compressing: %s", self.Provider, self.Path)
} }
func (*Artifact) State(name string) interface{} { func (*Artifact) State(name string) interface{} {
return nil return nil
} }
func (a *Artifact) Destroy() error { func (self *Artifact) Destroy() error {
return os.RemoveAll(a.dir) return os.Remove(self.Path)
} }
This diff is collapsed.
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