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