github.com/szyn/goreleaser@v0.76.1-0.20180517112710-333da09a1297/pipeline/fpm/fpm.go (about)

     1  // Package fpm implements the Pipe interface providing FPM bindings.
     2  package fpm
     3  
     4  import (
     5  	"github.com/goreleaser/goreleaser/context"
     6  	"github.com/goreleaser/goreleaser/internal/deprecate"
     7  )
     8  
     9  // Pipe for fpm packaging
    10  type Pipe struct{}
    11  
    12  func (Pipe) String() string {
    13  	return "creating Linux packages with fpm"
    14  }
    15  
    16  // Default sets the pipe defaults
    17  func (Pipe) Default(ctx *context.Context) error {
    18  	if len(ctx.Config.FPM.Formats) > 0 && len(ctx.Config.NFPM.Formats) == 0 {
    19  		deprecate.Notice("fpm")
    20  		ctx.Config.NFPM = ctx.Config.FPM
    21  	}
    22  	return nil
    23  }