Change creating boxes for customizing metadata.json.
This commit is contained in:
parent
b30f901fc3
commit
dc555d6b5b
|
@ -101,16 +101,6 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
}
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
// Copy all of the includes files into the temporary directory
|
||||
for _, src := range config.Include {
|
||||
ui.Message(fmt.Sprintf("Copying from include: %s", src))
|
||||
dst := filepath.Join(dir, filepath.Base(src))
|
||||
if err := CopyContents(dst, src); err != nil {
|
||||
err = fmt.Errorf("Error copying include file: %s\n\n%s", src, err)
|
||||
return nil, false, err
|
||||
}
|
||||
}
|
||||
|
||||
// Run the provider processing step
|
||||
vagrantfile, metadata, err := provider.Process(ui, artifact, dir)
|
||||
if err != nil {
|
||||
|
@ -122,6 +112,16 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
return nil, false, err
|
||||
}
|
||||
|
||||
// Copy all of the includes files into the temporary directory
|
||||
for _, src := range config.Include {
|
||||
ui.Message(fmt.Sprintf("Copying from include: %s", src))
|
||||
dst := filepath.Join(dir, filepath.Base(src))
|
||||
if err := CopyContents(dst, src); err != nil {
|
||||
err = fmt.Errorf("Error copying include file: %s\n\n%s", src, err)
|
||||
return nil, false, err
|
||||
}
|
||||
}
|
||||
|
||||
// Write our Vagrantfile
|
||||
var customVagrantfile string
|
||||
if config.VagrantfileTemplate != "" {
|
||||
|
|
Loading…
Reference in New Issue