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:
parent
51fff6f937
commit
69845c683b
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user