You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
Merge pull request #196 from goreleaser/rm-deprec
removed deprecated code
This commit is contained in:
@@ -21,7 +21,6 @@ func (r Repo) String() string {
|
||||
|
||||
// Homebrew contains the brew section
|
||||
type Homebrew struct {
|
||||
Repo string // deprecated!
|
||||
GitHub Repo
|
||||
Folder string
|
||||
Caveats string
|
||||
@@ -44,7 +43,6 @@ type Build struct {
|
||||
Main string
|
||||
Ldflags string
|
||||
Flags string
|
||||
BinaryName string `yaml:"binary_name"` // deprecated
|
||||
Binary string
|
||||
Hooks Hooks
|
||||
}
|
||||
@@ -59,7 +57,6 @@ type Archive struct {
|
||||
|
||||
// Release config used for the GitHub release
|
||||
type Release struct {
|
||||
Repo string // deprecated!
|
||||
GitHub Repo
|
||||
}
|
||||
|
||||
@@ -71,7 +68,7 @@ type FPM struct {
|
||||
Options FPMOptions
|
||||
}
|
||||
|
||||
// FPM config options
|
||||
// FPMOptions config options
|
||||
type FPMOptions struct {
|
||||
Vendor string
|
||||
URL string
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user