Merge branch 'fix_gce_image_name' of https://github.com/samitpal/packer into b-google-image-name

This commit is contained in:
Chris Bednarski 2015-07-07 16:19:55 -06:00
commit 775450f46a
1 changed files with 7 additions and 1 deletions

View File

@ -73,7 +73,13 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
if c.ImageName == "" {
c.ImageName = "packer-{{timestamp}}"
img, err := interpolate.Render("packer-{{timestamp}}", nil)
if err != nil {
panic(err)
}
// Default to packer-{{ unix timestamp (utc) }}
c.ImageName = img
}
if c.InstanceName == "" {