Skip to content

Commit

Permalink
Merge pull request #1860 from carolynvs/fix-release
Browse files Browse the repository at this point in the history
Use porter from the bin or the PATH
  • Loading branch information
carolynvs authored Jan 12, 2022
2 parents d7d2341 + 9bece06 commit ef3ab34
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mage/releases/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,15 @@ func PublishPluginFeed(plugin string) {
func generatePackageFeed(pkgType string) {
pkgDir := pkgType + "s"
feedFile := filepath.Join(packagesRepo, pkgDir, "atom.xml")
must.RunV("porter", "mixins", "feed", "generate", "-d", filepath.Join("bin", pkgDir), "-f", feedFile, "-t", "build/atom-template.xml")

// Try to use a local copy of porter first, otherwise use the
// one installed in GOAPTH/bin
porterPath := "bin/porter"
if _, err := os.Stat(porterPath); err != nil {
porterPath = "porter"
tools.EnsurePorter()
}
must.RunV(porterPath, "mixins", "feed", "generate", "-d", filepath.Join("bin", pkgDir), "-f", feedFile, "-t", "build/atom-template.xml")
}

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

0 comments on commit ef3ab34

Please sign in to comment.