Skip to content

Commit 857eb0c

Browse files
committed
consolidate version location
1 parent a55ede8 commit 857eb0c

File tree

3 files changed

+19
-29
lines changed

3 files changed

+19
-29
lines changed

builder/proxmox/version/version.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

main.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,18 @@ import (
55
"os"
66

77
"github.com/hashicorp/packer-plugin-sdk/plugin"
8-
"github.com/hashicorp/packer-plugin-sdk/version"
98

109
proxmoxclone "github.com/hashicorp/packer-plugin-proxmox/builder/proxmox/clone"
1110
proxmoxiso "github.com/hashicorp/packer-plugin-proxmox/builder/proxmox/iso"
12-
)
13-
14-
var (
15-
// Version is the main version number that is being run at the moment.
16-
Version = "1.0.1"
17-
18-
// VersionPrerelease is A pre-release marker for the Version. If this is ""
19-
// (empty string) then it means that it is a final release. Otherwise, this
20-
// is a pre-release such as "dev" (in development), "beta", "rc1", etc.
21-
VersionPrerelease = ""
22-
23-
// PluginVersion is used by the plugin set to allow Packer to recognize
24-
// what version this plugin is.
25-
PluginVersion = version.InitializePluginVersion(Version, VersionPrerelease)
11+
"github.com/hashicorp/packer-plugin-proxmox/version"
2612
)
2713

2814
func main() {
2915
pps := plugin.NewSet()
3016
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(proxmoxiso.Builder))
3117
pps.RegisterBuilder("proxmox-iso", new(proxmoxiso.Builder))
3218
pps.RegisterBuilder("proxmox-clone", new(proxmoxclone.Builder))
33-
pps.SetVersion(PluginVersion)
19+
pps.SetVersion(version.PluginVersion)
3420
err := pps.Run()
3521
if err != nil {
3622
fmt.Fprintln(os.Stderr, err.Error())

version/version.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package version
2+
3+
import "github.com/hashicorp/packer-plugin-sdk/version"
4+
5+
var (
6+
// Version is the main version number that is being run at the moment.
7+
Version = "1.0.1"
8+
9+
// VersionPrerelease is A pre-release marker for the Version. If this is ""
10+
// (empty string) then it means that it is a final release. Otherwise, this
11+
// is a pre-release such as "dev" (in development), "beta", "rc1", etc.
12+
VersionPrerelease = "dev"
13+
14+
// PluginVersion is used by the plugin set to allow Packer to recognize
15+
// what version this plugin is.
16+
PluginVersion = version.InitializePluginVersion(Version, VersionPrerelease)
17+
)

0 commit comments

Comments
 (0)