From f0e83beaaaf267af60717356a5d4846459722e12 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Thu, 16 Mar 2017 11:38:43 -0700 Subject: [PATCH] display version correctly --- command/version.go | 2 +- version/version.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/version.go b/command/version.go index 4fb07a90f..85b61844b 100644 --- a/command/version.go +++ b/command/version.go @@ -40,7 +40,7 @@ func (c *VersionCommand) Run(args []string) int { var versionString bytes.Buffer fmt.Fprintf(&versionString, "Packer v%s", c.Version) if c.VersionPrerelease != "" { - fmt.Fprintf(&versionString, ".%s", c.VersionPrerelease) + fmt.Fprintf(&versionString, "-%s", c.VersionPrerelease) if c.Revision != "" { fmt.Fprintf(&versionString, " (%s)", c.Revision) diff --git a/version/version.go b/version/version.go index 69a326a45..d5953c33f 100644 --- a/version/version.go +++ b/version/version.go @@ -20,7 +20,7 @@ func FormattedVersion() string { var versionString bytes.Buffer fmt.Fprintf(&versionString, "%s", Version) if VersionPrerelease != "" { - fmt.Fprintf(&versionString, ".%s", VersionPrerelease) + fmt.Fprintf(&versionString, "-%s", VersionPrerelease) if GitCommit != "" { fmt.Fprintf(&versionString, " (%s)", GitCommit)