1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/content/deprecations.md
Carlos Alexandro Becker 885a9710e5
feat: remove deprecated nfpm (#1280)
* clean: remove deprecated nfpm

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: test

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-12-27 14:51:40 -03:00

5.2 KiB

title menu weight hideFromIndex
Deprecation notices true 500 true

This page will be used to list deprecation notices across GoReleaser.

Deprecate code will be removed after ~6 months from the time it was deprecated.

You can check your use of deprecated configurations by running:

$ goreleaser check

Active deprecation notices

puts

since 2019-11-15

The HTTP upload support was extended to also accept POST as a method, so the name puts kind of lost its meaning.

Change this:

puts:
- ...

to this:

uploads:
- ...

Also note that secrets environment variable name prefixes have changed from PUT_ to UPLOAD_.

nfpms.name_template

since 2019-11-15

The name_template field was deprecated in favor of a more clear one, file_name_template.

Change this:

nfpms:
  - name_template: foo

to this:

nfpms:
  - file_name_template: foo

blob

since 2019-08-02

Blob was deprecated in favor of its plural form. It was already accepting multiple inputs, but its pluralized now so its more clear.

Change this:

blob:
  # etc

to this:

blobs:
  # etc

sign

since 2019-07-20

Sign was deprecated in favor of its plural form.

Change this:

sign:
  # etc

to this:

signs:
  -
    # etc

brew

since 2019-06-09

Brew was deprecated in favor of its plural form.

Change this:

brew:
  # etc

to this:

brews:
  -
    # etc

s3

since 2019-06-09

S3 was deprecated in favor of the new blob, which supports S3, Azure Blob and GCS.

Change this:

s3:
-
  # etc

to this:

blobs:
-
  provider: s3
  # etc

snapcraft

since 2019-05-27

We now allow multiple Snapcraft configs, so the snapcraft statement will be removed.

Change this:

snapcraft:
  publish: true
  # ...

to this:

snapcrafts:
  -
    publish: true
    # ...

archive

since 2019-04-16

We now allow multiple archives, so the archive statement will be removed.

Change this:

archive:
  format: zip

to this:

archives:
  - id: foo
    format: zip

Expired deprecation notices

The following options were deprecated for ~6 months and are now fully removed.

nfpm

since 2019-05-07, removed 2019-12-27

We now allow multiple NFPM config, so the nfpm statement will be removed.

Change this:

nfpm:
  formats:
    - deb

to this:

nfpms:
  -
    formats:
      - deb

docker.binary

since 2018-10-01, removed 2019-08-02

You can now create a Docker image with multiple binaries.

Change this:

dockers:
- image: foo/bar
  binary: foo

to this:

dockers:
- image: foo/bar
  binaries:
  - foo

docker.image

since 2018-10-20, removed 2019-08-02

This property was deprecated in favor of more flexible image_templates. The idea is to be able to define several images and tags using templates instead of just one image with tag templates. This flexibility allows images to be pushed to multiple registries.

Change this:

dockers:
- image: foo/bar
  tag_templates:
    - '{{ .Tag }}'

to this:

dockers:
- image_templates:
    - 'foo/bar:{{ .Tag }}'

docker.tag_templates

since 2018-10-20, removed 2019-08-02

This property was deprecated in favor of more flexible image_templates. The idea is to be able to define several images and tags using templates instead of just one image with tag templates.

Change this:

dockers:
- image: foo/bar
  tag_templates:
    - '{{ .Tag }}'

to this:

dockers:
- image_templates:
    - 'foo/bar:{{ .Tag }}'

git.short_hash

since 2018-10-03, removed 2019-01-19

This property was being used to tell GoReleaser to use short git hashes instead of the full ones. This has been removed in favor of specific template variables (.FullCommit and .ShortCommit).

Change this:

git:
  short_hash: true

fake:
  foo_template: 'blah {{ .Commit }}'

to this:

fake:
  foo_template: 'blah {{ .ShortCommit }}'

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 CI/CD pipelines.

Just replace the fpm keyword by nfpm in your goreleaser.yaml file.

Change this:

fpm:
  # ...

to this:

nfpm:
  # ...

docker.tag_template

since 2018-01-19, removed 2017-08-15

This property was deprecated in favor of the pluralized tag_templates. The idea is to be able to define several tags instead of just one.

Change this:

dockers:
- image: foo/bar
  tag_template: '{{ .Tag }}'

to this:

dockers:
- image: foo/bar
  tag_templates:
    - '{{ .Tag }}'

docker.latest

since 2018-01-19, removed 2017-08-15

The latest field in Docker config is deprecated in favor of the newer tag_templates field.

Change this:

dockers:
- image: foo/bar
  latest: true

to this:

dockers:
- image: foo/bar
  tag_templates:
    - '{{ .Tag }}'
    - latest