Skip to content

Commit

Permalink
XBuildAll expects to publish a mixin (#6)
Browse files Browse the repository at this point in the history
* XBuildAll expects to publish a mixin
Fixes #4

Signed-off-by: Brian DeGeeter <[email protected]>

* XBuildAll expects to publish a mixin
Fixes #4

Signed-off-by: Brian DeGeeter <[email protected]>
  • Loading branch information
bdegeeter authored Apr 11, 2022
1 parent 48da115 commit dfcc01a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions mixins/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions releases/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
6 changes: 5 additions & 1 deletion tools/install_test.go
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit dfcc01a

Please sign in to comment.