Skip to content

Commit ef3ab34

Browse files
authored
Merge pull request #1860 from carolynvs/fix-release
Use porter from the bin or the PATH
2 parents d7d2341 + 9bece06 commit ef3ab34

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

mage/releases/publish.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,15 @@ func PublishPluginFeed(plugin string) {
161161
func generatePackageFeed(pkgType string) {
162162
pkgDir := pkgType + "s"
163163
feedFile := filepath.Join(packagesRepo, pkgDir, "atom.xml")
164-
must.RunV("porter", "mixins", "feed", "generate", "-d", filepath.Join("bin", pkgDir), "-f", feedFile, "-t", "build/atom-template.xml")
164+
165+
// Try to use a local copy of porter first, otherwise use the
166+
// one installed in GOAPTH/bin
167+
porterPath := "bin/porter"
168+
if _, err := os.Stat(porterPath); err != nil {
169+
porterPath = "porter"
170+
tools.EnsurePorter()
171+
}
172+
must.RunV(porterPath, "mixins", "feed", "generate", "-d", filepath.Join("bin", pkgDir), "-f", feedFile, "-t", "build/atom-template.xml")
165173
}
166174

167175
// Generate a mixin feed from any mixin versions in bin/mixins.

0 commit comments

Comments
 (0)