From 15fc570317e3916fa9f86175fa62175fd049bc9e Mon Sep 17 00:00:00 2001 From: Carolyn Van Slyck Date: Thu, 13 Apr 2023 14:50:45 -0500 Subject: [PATCH] Use porter from bin during CI When we are working with Porter in CI, we should install porter into the bin/ directory and use it from there. The magefiles repository assumes porter is installed in the bin for actions like publishing the atom feed. Signed-off-by: Carolyn Van Slyck --- magefile.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/magefile.go b/magefile.go index 531ef77..433c985 100644 --- a/magefile.go +++ b/magefile.go @@ -85,13 +85,16 @@ var operatorBundleRef = fmt.Sprintf("%s/%s:%s", operatorRegistry, operatorImage, // Build a command that stops the build on if the command fails var must = shx.CommandBuilder{StopOnError: true} -// Publish the cross-compiled binaries. +// Publish uploads the cross-compiled binaries for the plugin func Publish() { + mg.SerialDeps(porter.UseBinForPorterHome, porter.EnsurePorter) + + releases.PreparePluginForPublish(pluginName) releases.PublishPlugin(pluginName) releases.PublishPluginFeed(pluginName) } -// Test out publish locally, with your github forks +// TestPublish tries out publish locally, with your github forks // Assumes that you forked and kept the repository name unchanged. func TestPublish(username string) { pluginRepo := fmt.Sprintf("github.com/%s/%s-plugins", username, pluginName)