1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00

clean: remove fpm completely (#758)

This commit is contained in:
Carlos Alexandro Becker 2018-08-15 09:56:49 -03:00 committed by GitHub
parent a91c8fd185
commit f0b7608f4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 63 deletions

View File

@ -13,7 +13,6 @@ import (
"github.com/goreleaser/goreleaser/internal/pipeline/checksums"
"github.com/goreleaser/goreleaser/internal/pipeline/docker"
"github.com/goreleaser/goreleaser/internal/pipeline/env"
"github.com/goreleaser/goreleaser/internal/pipeline/fpm"
"github.com/goreleaser/goreleaser/internal/pipeline/nfpm"
"github.com/goreleaser/goreleaser/internal/pipeline/project"
"github.com/goreleaser/goreleaser/internal/pipeline/release"
@ -48,7 +47,6 @@ var defaulters = []Defaulter{
project.Pipe{},
archive.Pipe{},
build.Pipe{},
fpm.Pipe{},
nfpm.Pipe{},
snapcraft.Pipe{},
checksums.Pipe{},

View File

@ -1,23 +0,0 @@
// Package fpm implements the Pipe interface providing FPM bindings.
package fpm
import (
"github.com/goreleaser/goreleaser/internal/deprecate"
"github.com/goreleaser/goreleaser/pkg/context"
)
// Pipe for fpm packaging
type Pipe struct{}
func (Pipe) String() string {
return "creating Linux packages with fpm"
}
// Default sets the pipe defaults
func (Pipe) Default(ctx *context.Context) error {
if len(ctx.Config.FPM.Formats) > 0 && len(ctx.Config.NFPM.Formats) == 0 {
deprecate.Notice("fpm")
ctx.Config.NFPM = ctx.Config.FPM
}
return nil
}

View File

@ -1,37 +0,0 @@
package fpm
import (
"testing"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/stretchr/testify/assert"
)
func TestDescription(t *testing.T) {
assert.NotEmpty(t, Pipe{}.String())
}
func TestDefault(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
FPM: config.NFPM{
Formats: []string{"deb"},
},
},
}
assert.NoError(t, Pipe{}.Default(ctx))
assert.Equal(t, ctx.Config.FPM, ctx.Config.NFPM)
}
func TestDefaultSet(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
NFPM: config.NFPM{
Formats: []string{"deb"},
},
},
}
assert.NoError(t, Pipe{}.Default(ctx))
assert.Equal(t, config.NFPM{}, ctx.Config.FPM)
}

View File

@ -303,7 +303,6 @@ type Project struct {
Scoop Scoop `yaml:",omitempty"`
Builds []Build `yaml:",omitempty"`
Archive Archive `yaml:",omitempty"`
FPM NFPM `yaml:",omitempty"` // deprecated
NFPM NFPM `yaml:",omitempty"`
Snapcraft Snapcraft `yaml:",omitempty"`
Snapshot Snapshot `yaml:",omitempty"`

View File

@ -7,6 +7,12 @@ hideFromIndex: true
This page will be used to list deprecation notices accross GoReleaser.
Deprecate code will be removed after ~6 months from the time it was deprecated.
# Active deprecation notices
No active deprecation notices at this time.
<!--
Template for new deprecations:
@ -29,9 +35,12 @@ to this:
-->
# Expired deprecation notices
## fpm
> since 2018-02-17
> removed 2017-08-15
FPM is deprecated in favor of nfpm, which is a simpler alternative written
in Go. The objective is to remove the ruby dependency thus simplify the