diff --git a/internal/pipeline/defaults/defaults.go b/internal/pipeline/defaults/defaults.go index e1cdf1dfe..4d5043f56 100644 --- a/internal/pipeline/defaults/defaults.go +++ b/internal/pipeline/defaults/defaults.go @@ -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{}, diff --git a/internal/pipeline/fpm/fpm.go b/internal/pipeline/fpm/fpm.go deleted file mode 100644 index 4b6d5a9d4..000000000 --- a/internal/pipeline/fpm/fpm.go +++ /dev/null @@ -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 -} diff --git a/internal/pipeline/fpm/fpm_test.go b/internal/pipeline/fpm/fpm_test.go deleted file mode 100644 index 3d6472a38..000000000 --- a/internal/pipeline/fpm/fpm_test.go +++ /dev/null @@ -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) -} diff --git a/pkg/config/config.go b/pkg/config/config.go index 79f2caeaa..c2aa6088c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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"` diff --git a/www/content/deprecations.md b/www/content/deprecations.md index 39ef18dac..f45f91f93 100644 --- a/www/content/deprecations.md +++ b/www/content/deprecations.md @@ -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. + +# 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