You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
create brew formulae in a subfolder
This commit is contained in:
@@ -55,6 +55,7 @@ repo: user/repo
|
|||||||
binary_name: my-binary
|
binary_name: my-binary
|
||||||
brew:
|
brew:
|
||||||
repo: user/homebrew-tap
|
repo: user/homebrew-tap
|
||||||
|
folder: optional/subfolder/inside/the/repo
|
||||||
caveats: "Optional caveats to add to the formulae"
|
caveats: "Optional caveats to add to the formulae"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@ var filePatterns = []string{"LICENCE*", "LICENSE*", "README*", "CHANGELOG*"}
|
|||||||
// Homebrew contains the brew section
|
// Homebrew contains the brew section
|
||||||
type Homebrew struct {
|
type Homebrew struct {
|
||||||
Repo string
|
Repo string
|
||||||
|
Folder string
|
||||||
Token string `yaml:"-"`
|
Token string `yaml:"-"`
|
||||||
Caveats string
|
Caveats string
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
@@ -58,8 +59,7 @@ func (Pipe) Run(config config.ProjectConfig) error {
|
|||||||
client := github.NewClient(tc)
|
client := github.NewClient(tc)
|
||||||
|
|
||||||
owner, repo := split.OnSlash(config.Brew.Repo)
|
owner, repo := split.OnSlash(config.Brew.Repo)
|
||||||
path := config.BinaryName + ".rb"
|
path := filepath.Join(config.Brew.Folder, config.BinaryName+".rb")
|
||||||
|
|
||||||
log.Println("Updating", path, "on", config.Brew.Repo, "...")
|
log.Println("Updating", path, "on", config.Brew.Repo, "...")
|
||||||
out, err := buildFormulae(config, client)
|
out, err := buildFormulae(config, client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user