mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-27 21:39:20 +02:00
- refactors brew template into separated files using embed.FS - moves the macos and linux packages to different template files - includes and indent those accordingly to which OSes are supported closes #4561 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
40 lines
891 B
Go
40 lines
891 B
Go
package brew
|
|
|
|
import (
|
|
"embed"
|
|
|
|
"github.com/goreleaser/goreleaser/pkg/config"
|
|
)
|
|
|
|
type templateData struct {
|
|
Name string
|
|
Desc string
|
|
Homepage string
|
|
Version string
|
|
License string
|
|
Caveats []string
|
|
Plist string
|
|
PostInstall []string
|
|
Dependencies []config.HomebrewDependency
|
|
Conflicts []string
|
|
Tests []string
|
|
CustomRequire string
|
|
CustomBlock []string
|
|
LinuxPackages []releasePackage
|
|
MacOSPackages []releasePackage
|
|
Service []string
|
|
HasOnlyAmd64MacOsPkg bool
|
|
}
|
|
|
|
type releasePackage struct {
|
|
DownloadURL string
|
|
SHA256 string
|
|
OS string
|
|
Arch string
|
|
DownloadStrategy string
|
|
Install []string
|
|
}
|
|
|
|
//go:embed templates
|
|
var formulaTemplate embed.FS
|