Remove the "compress" post-processor for now
This commit is contained in:
parent
df577b028a
commit
a7c12fadc6
|
@ -1,10 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/mitchellh/packer/packer/plugin"
|
||||
"github.com/mitchellh/packer/post-processor/compress"
|
||||
)
|
||||
|
||||
func main() {
|
||||
plugin.ServePostProcessor(new(compress.PostProcessor))
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
// compress implements the packer.PostProcessor interface and adds a
|
||||
// post-processor for compressing output.
|
||||
package compress
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Format string
|
||||
}
|
||||
|
||||
type PostProcessor struct {
|
||||
config Config
|
||||
}
|
||||
|
||||
func (p *PostProcessor) Configure(raw interface{}) error {
|
||||
if err := mapstructure.Decode(raw, &p.config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if p.config.Format == "" {
|
||||
p.config.Format = "tar.gz"
|
||||
}
|
||||
|
||||
if p.config.Format != "tar.gz" {
|
||||
return errors.New("only 'tar.gz' is a supported format right now")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, error) {
|
||||
ui.Say("We made it to here.")
|
||||
return nil, nil
|
||||
}
|
Loading…
Reference in New Issue