1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

merge fixes

This commit is contained in:
Carlos Alexandro Becker 2017-09-24 14:25:21 -03:00
parent 632d206848
commit 4fefd7608e
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
5 changed files with 6 additions and 7 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ dist/
vendor
coverage.txt
goreleaser
.idea/

View File

@ -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

View File

@ -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.

View File

@ -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
}

View File

@ -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 }}