From 43b82d0e6922a64f99f4b1472075e33b6918279c Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 21 Apr 2017 11:42:13 -0300 Subject: [PATCH 1/2] possible fix for #186 --- client/github.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/client/github.go b/client/github.go index 5829becf4..f02b6862c 100644 --- a/client/github.go +++ b/client/github.go @@ -76,15 +76,9 @@ func (c *githubClient) GetInfo(ctx *context.Context) (info Info, err error) { if err != nil { return } - if rep.Homepage != nil { - info.Homepage = *rep.Homepage - } - if rep.HTMLURL != nil { - info.URL = *rep.HTMLURL - } - if rep.Description != nil { - info.Description = *rep.Description - } + info.Homepage = rep.GetHomepage() + info.URL = rep.GetHTMLURL() + info.Description = rep.GetDescription() return } @@ -107,16 +101,16 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (release ctx.Config.Release.GitHub.Name, data, ) - return *r.ID, err + return r.GetID(), err } r, _, err = c.client.Repositories.EditRelease( ctx, ctx.Config.Release.GitHub.Owner, ctx.Config.Release.GitHub.Name, - *r.ID, + r.GetID(), data, ) - return *r.ID, err + return r.GetID(), err } func (c *githubClient) Upload( From e694848e94182f9f08973883d92556d44919d517 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 21 Apr 2017 11:57:36 -0300 Subject: [PATCH 2/2] add more fpm tests --- pipeline/fpm/fpm_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pipeline/fpm/fpm_test.go b/pipeline/fpm/fpm_test.go index ac10c9d16..ccd891c7c 100644 --- a/pipeline/fpm/fpm_test.go +++ b/pipeline/fpm/fpm_test.go @@ -49,6 +49,13 @@ func TestRunPipe(t *testing.T) { Formats: []string{"deb"}, Dependencies: []string{"make"}, Conflicts: []string{"git"}, + Options: config.FPMOptions{ + Description: "Some description", + License: "MIT", + Maintainer: "me@me", + Vendor: "asdf", + URL: "https://goreleaser.github.io", + }, }, }, }