mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
merge fixes
This commit is contained in:
parent
632d206848
commit
4fefd7608e
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,4 +2,3 @@ dist/
|
||||
vendor
|
||||
coverage.txt
|
||||
goreleaser
|
||||
.idea/
|
||||
|
@ -20,7 +20,7 @@ release:
|
||||
# Default is github.com.
|
||||
api_url: github api endpoint
|
||||
uploads_url: github file uploads url
|
||||
download_url github download url
|
||||
downloads_url github download url
|
||||
|
||||
# If set to true, will not auto-publish the release.
|
||||
# Default is false
|
||||
|
@ -23,7 +23,7 @@ brew:
|
||||
# Default is github.com.
|
||||
api_url: github api endpoint
|
||||
uploads_url: github file uploads url
|
||||
download_url github download url
|
||||
downloads_url github download url
|
||||
|
||||
# Folder inside the repository to put the formula.
|
||||
# Default is the root folder.
|
||||
|
@ -22,8 +22,8 @@ func NewGitHub(ctx *context.Context, repo config.Repo) (Client, error) {
|
||||
&oauth2.Token{AccessToken: ctx.Token},
|
||||
)
|
||||
client := github.NewClient(oauth2.NewClient(ctx, ts))
|
||||
if repo.ApiURL != "" {
|
||||
url, err := url.Parse(repo.ApiURL)
|
||||
if repo.APIURL != "" {
|
||||
url, err := url.Parse(repo.APIURL)
|
||||
if err != nil {
|
||||
return &githubClient{}, err
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ const formulaTemplate = `class {{ .Name }} < Formula
|
||||
desc "{{ .Desc }}"
|
||||
homepage "{{ .Homepage }}"
|
||||
|
||||
{{ if .Repo.DownloadURL }}
|
||||
url "{{ .Repo.DownloadURL }}{{ .Repo.Owner }}/{{ .Repo.Name }}/releases/download/{{ .Tag }}/{{ .File }}"
|
||||
{{ if .Repo.DownloadsURL }}
|
||||
url "{{ .Repo.DownloadsURL }}{{ .Repo.Owner }}/{{ .Repo.Name }}/releases/download/{{ .Tag }}/{{ .File }}"
|
||||
{{ else }}
|
||||
url "https://github.com/{{ .Repo.Owner }}/{{ .Repo.Name }}/releases/download/{{ .Tag }}/{{ .File }}"
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user