diff --git a/mixins/magefile.go b/mixins/magefile.go index 822d4e1..62c94a9 100644 --- a/mixins/magefile.go +++ b/mixins/magefile.go @@ -35,6 +35,7 @@ func (m Magefile) Build() { // Cross-compile the mixin before a release func (m Magefile) XBuildAll() { releases.XBuildAll(m.Pkg, m.MixinName, m.BinDir) + releases.PrepareMixinForPublish(m.MixinName) } // Run unit tests diff --git a/releases/build.go b/releases/build.go index 4ed8fb9..0803f5e 100644 --- a/releases/build.go +++ b/releases/build.go @@ -85,6 +85,4 @@ func XBuildAll(pkg string, name string, binDir string) { // Copy most recent build into bin/dev so that subsequent build steps can easily find it, not used for publishing os.RemoveAll(filepath.Join(binDir, "dev")) shx.Copy(filepath.Join(binDir, info.Version), filepath.Join(binDir, "dev"), shx.CopyRecursive) - - PrepareMixinForPublish(name) } diff --git a/tools/install_test.go b/tools/install_test.go index 52dd65e..5dbdfef 100644 --- a/tools/install_test.go +++ b/tools/install_test.go @@ -1,15 +1,19 @@ package tools_test import ( + "testing" + "get.porter.sh/magefiles/tools" "github.com/carolynvs/magex/pkg" + "github.com/carolynvs/magex/pkg/gopath" + "github.com/carolynvs/magex/xplat" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" ) func TestEnsureKind(t *testing.T) { tools.EnsureKind() + xplat.PrependPath(gopath.GetGopathBin()) found, err := pkg.IsCommandAvailable("kind", tools.DefaultKindVersion, "--version") require.NoError(t, err) assert.True(t, found)