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

removed deprecated code

This commit is contained in:
Carlos Alexandro Becker 2017-04-21 12:31:06 -03:00
parent 51fff6f937
commit 69845c683b
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
3 changed files with 0 additions and 33 deletions

View File

@ -94,15 +94,6 @@ func (Pipe) Run(ctx *context.Context) error {
}
func doRun(ctx *context.Context, client client.Client) error {
// TODO: remove this block in next release cycle
if ctx.Config.Brew.Repo != "" {
log.Println("The `brew.repo` syntax is deprecated and will soon be removed. Please check the README for more info.")
var ss = strings.Split(ctx.Config.Brew.Repo, "/")
ctx.Config.Brew.GitHub = config.Repo{
Owner: ss[0],
Name: ss[1],
}
}
if !ctx.Publish {
log.Println("Skipped because --skip-publish is set")
return nil

View File

@ -2,8 +2,6 @@ package build
import (
"bytes"
"log"
"strings"
"text/template"
"github.com/goreleaser/goreleaser/context"
@ -24,17 +22,6 @@ func nameFor(ctx *context.Context, goos, goarch string) (string, error) {
Binary: ctx.Config.Build.Binary,
}
// TODO: remove this block in next release cycle
if strings.Contains(ctx.Config.Archive.NameTemplate, ".BinaryName") {
log.Println("The `.BinaryName` in `archive.name_template` is deprecated and will soon be removed. Please check the README for more info.")
ctx.Config.Archive.NameTemplate = strings.Replace(
ctx.Config.Archive.NameTemplate,
".BinaryName",
".Binary",
-1,
)
}
var out bytes.Buffer
t, err := template.New(data.Binary).Parse(ctx.Config.Archive.NameTemplate)
if err != nil {

View File

@ -5,7 +5,6 @@ package defaults
import (
"errors"
"io/ioutil"
"log"
"strings"
"github.com/goreleaser/goreleaser/context"
@ -23,11 +22,6 @@ func (Pipe) Description() string {
// Run the pipe
func (Pipe) Run(ctx *context.Context) error {
// TODO: remove this block in next release cycle
if ctx.Config.Release.Repo != "" {
log.Println("The `release.repo` syntax is deprecated and will soon be removed. Please check the README for more info.")
ctx.Config.Release.GitHub = toRepo(ctx.Config.Release.Repo)
}
if ctx.Config.Release.GitHub.Name == "" {
repo, err := remoteRepo()
ctx.Config.Release.GitHub = repo
@ -36,11 +30,6 @@ func (Pipe) Run(ctx *context.Context) error {
return errors.New("failed reading repo from git: " + err.Error())
}
}
// TODO: remove this block in next release cycle
if ctx.Config.Build.BinaryName != "" {
log.Println("The `build.binary_name` syntax is deprecated and will soon be removed. Please check the README for more info.")
ctx.Config.Build.Binary = ctx.Config.Build.BinaryName
}
if ctx.Config.Build.Binary == "" {
ctx.Config.Build.Binary = ctx.Config.Release.GitHub.Name
}