Skip to content

Commit c22cd61

Browse files
Merge pull request #30 from getporter/pushLatestTag
Publish Examples with Latest Tag
2 parents e0f93f7 + b6f61ba commit c22cd61

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

mage/setup/mixins.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ func InstallMixins() error {
2525
for _, mixin := range mixins {
2626
mixin := mixin
2727
errG.Go(func() error {
28+
for i := 0; i < 3; i++ {
29+
if err := porter.EnsureMixin(mixin); err == nil {
30+
return nil
31+
}
32+
}
2833
return porter.EnsureMixin(mixin)
2934
})
3035
}

magefile.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ func PublishExample(name string) error {
116116
}
117117

118118
fmt.Printf("Publishing example bundle: %s\n", name)
119-
return shx.Command("porter", "publish", registryFlag).CollapseArgs().In(name).RunV()
119+
err = shx.Command("porter", "publish", registryFlag).CollapseArgs().In(name).RunV()
120+
mgx.Must(err)
121+
122+
// Publish with latest tag
123+
return shx.Command("porter", "publish", "--tag", "latest").CollapseArgs().In(name).RunV()
120124
}
121125

122126
// SetupDCO configures your git repository to automatically sign your commits

0 commit comments

Comments
 (0)