backport of commit 2bdf006638

backport/acc_test_logic/wrongly-witty-moccasin
Lucas Bajolet 2 years ago
parent d4d2103c86
commit 450ff9ebfc

@ -86,16 +86,17 @@ func BinaryName(version *version.Version) string {
// ExpectedInstalledName is the expected full name of the plugin once installed.
func ExpectedInstalledName(versionStr string) string {
v := version.Must(version.NewSemver(versionStr))
version.Must(version.NewVersion(versionStr))
versionStr = strings.ReplaceAll(versionStr, "v", "")
ext := ""
if runtime.GOOS == "windows" {
ext = ".exe"
}
return fmt.Sprintf("packer-plugin-tester_v%s%s_x%s.%s_%s_%s%s",
v.Core().String(),
v.Prerelease(),
return fmt.Sprintf("packer-plugin-tester_v%s_x%s.%s_%s_%s%s",
versionStr,
plugin.APIVersionMajor,
plugin.APIVersionMinor,
runtime.GOOS, runtime.GOARCH, ext)

Loading…
Cancel
Save