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