Skip to content

Commit 4260b67

Browse files
authored
Merge pull request #36 from hashicorp/plugin_version_default
Add default version
2 parents d56632c + eb9e2bd commit 4260b67

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,6 @@ github.com/hashicorp/packer v1.6.7-0.20210125170305-539638b0f951 h1:p4nxOBaxLlMA
384384
github.com/hashicorp/packer v1.6.7-0.20210125170305-539638b0f951/go.mod h1:Z3eunaxVQ3XgQ+rW7TEH0T/PRQzCUSyCBUTkm/VL7io=
385385
github.com/hashicorp/packer v1.6.7-0.20210126105722-aef4ced967ec h1:E3JlWgvQ/PzFx0X5sihNdx9XNhW08GjAbmVqLuHQ51g=
386386
github.com/hashicorp/packer v1.6.7-0.20210126105722-aef4ced967ec/go.mod h1:2+Vo/c/fA+TD9yFc/h9jQMFm4yG+IymQIr0OdJJOPiE=
387-
github.com/hashicorp/packer v1.6.7-0.20210205095714-ef4afafde9e9 h1:aN1sliuyaMT4uufsacaaKWmf4DomqBEz+DzYGb6jILw=
388-
github.com/hashicorp/packer v1.6.7-0.20210205095714-ef4afafde9e9/go.mod h1:MSh0q+aJsRJmBhZtl0SfsOSf0FHPjEiEKgN1guZc0dw=
389387
github.com/hashicorp/packer v1.6.7-0.20210208125835-f616955ebcb6 h1:sNvdk3PbCgjWavrz3LXGQKQK7opEbDc9YGxZW/PbT5o=
390388
github.com/hashicorp/packer v1.6.7-0.20210208125835-f616955ebcb6/go.mod h1:7f5ZpTTRG53rQ58BcTADuTnpiBcB3wapuxl4sF2sGMM=
391389
github.com/hashicorp/packer-plugin-sdk v0.0.6/go.mod h1:Nvh28f+Jmpp2rcaN79bULTouNkGNDRfHckhHKTAXtyU=

version/version.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ var SDKVersion = InitializePluginVersion(Version, VersionPrerelease)
3131
// versioning and to make sure that plugins which aren't following proper
3232
// semantic versioning crash immediately rather than later.
3333
func InitializePluginVersion(vers, versionPrerelease string) *PluginVersion {
34+
if vers == "" {
35+
// Defaults to "0.0.0". Useful when binary is created for development purpose.
36+
vers = "0.0.0"
37+
}
3438
pv := PluginVersion{
3539
version: vers,
3640
versionPrerelease: versionPrerelease,

0 commit comments

Comments
 (0)