1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-05 00:59:04 +02:00

refactor: global single name templating package

This commit is contained in:
Carlos Alexandro Becker
2018-07-08 20:47:30 -07:00
parent 8f675d8d91
commit fc80e6b799
13 changed files with 269 additions and 282 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/google/go-github/github"
"github.com/goreleaser/goreleaser/config"
"github.com/goreleaser/goreleaser/context"
"github.com/goreleaser/goreleaser/internal/nametemplate"
"github.com/goreleaser/goreleaser/internal/tmpl"
"golang.org/x/oauth2"
)
@ -90,7 +90,7 @@ func (c *githubClient) CreateFile(
func (c *githubClient) CreateRelease(ctx *context.Context, body string) (int64, error) {
var release *github.RepositoryRelease
title, err := nametemplate.Apply(ctx, ctx.Config.Release.NameTemplate)
title, err := tmpl.New(ctx).Apply(ctx.Config.Release.NameTemplate)
if err != nil {
return 0, err
}