scripts/generate-plugins.go: ignore "common" packages

This commit is contained in:
Adrien Delorme 2020-10-07 11:43:15 +02:00
parent cd3bdc9e38
commit 3e0633fc20
2 changed files with 10 additions and 9 deletions

View File

@ -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),

View File

@ -136,7 +136,10 @@ func listDirectories(path string) ([]string, error) {
for _, item := range items {
// We only want directories
if item.IsDir() {
if !item.IsDir() ||
item.Name() == "common" {
continue
}
currentDir := filepath.Join(path, item.Name())
names = append(names, currentDir)
@ -146,7 +149,6 @@ func listDirectories(path string) ([]string, error) {
names = append(names, subNames...)
}
}
}
return names, nil
}