From 3e0633fc20503cef67892d2cc13a8b4c2468927c Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 7 Oct 2020 11:43:15 +0200 Subject: [PATCH] scripts/generate-plugins.go: ignore "common" packages --- command/plugin.go | 1 - scripts/generate-plugins.go | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/command/plugin.go b/command/plugin.go index 38adb929c..e32fba0d0 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -148,7 +148,6 @@ var Builders = map[string]packer.Builder{ "profitbricks": new(profitbricksbuilder.Builder), "proxmox-clone": new(proxmoxclonebuilder.Builder), "proxmox-iso": new(proxmoxisobuilder.Builder), - "proxmox": new(proxmoxisobuilder.Builder), "qemu": new(qemubuilder.Builder), "scaleway": new(scalewaybuilder.Builder), "tencentcloud-cvm": new(tencentcloudcvmbuilder.Builder), diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index 9b79e3ee2..8fe8feddd 100644 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -136,15 +136,17 @@ func listDirectories(path string) ([]string, error) { for _, item := range items { // We only want directories - if item.IsDir() { - currentDir := filepath.Join(path, item.Name()) - names = append(names, currentDir) + if !item.IsDir() || + item.Name() == "common" { + continue + } + currentDir := filepath.Join(path, item.Name()) + names = append(names, currentDir) - // Do some recursion - subNames, err := listDirectories(currentDir) - if err == nil { - names = append(names, subNames...) - } + // Do some recursion + subNames, err := listDirectories(currentDir) + if err == nil { + names = append(names, subNames...) } }