Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove deprecated docker options #2400

Merged
merged 1 commit into from Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions internal/pipe/docker/docker.go
Expand Up @@ -48,13 +48,6 @@ func (Pipe) Default(ctx *context.Context) error {
if docker.Dockerfile == "" {
docker.Dockerfile = "Dockerfile"
}
if len(docker.Binaries) > 0 {
deprecate.Notice(ctx, "docker.binaries")
}
if len(docker.Builds) > 0 {
deprecate.Notice(ctx, "docker.builds")
docker.IDs = append(docker.IDs, docker.Builds...)
}
if docker.Buildx {
deprecate.Notice(ctx, "docker.use_buildx")
if docker.Use == "" {
Expand Down
6 changes: 2 additions & 4 deletions internal/pipe/docker/docker_test.go
Expand Up @@ -1106,9 +1106,7 @@ func TestDefault(t *testing.T) {
Config: config.Project{
Dockers: []config.Docker{
{
IDs: []string{"aa"},
Builds: []string{"foo"},
Binaries: []string{"aaa"},
IDs: []string{"aa"},
},
{
Use: useBuildx,
Expand All @@ -1127,7 +1125,7 @@ func TestDefault(t *testing.T) {
docker := ctx.Config.Dockers[0]
require.Equal(t, "linux", docker.Goos)
require.Equal(t, "amd64", docker.Goarch)
require.Equal(t, []string{"aa", "foo"}, docker.IDs)
require.Equal(t, []string{"aa"}, docker.IDs)
require.Equal(t, useDocker, docker.Use)
docker = ctx.Config.Dockers[1]
require.Equal(t, useBuildx, docker.Use)
Expand Down
2 changes: 0 additions & 2 deletions pkg/config/config.go
Expand Up @@ -541,8 +541,6 @@ type Checksum struct {

// Docker image config.
type Docker struct {
Binaries []string `yaml:",omitempty"` // deprecated: no need to use this anymore
Builds []string `yaml:",omitempty"` // deprecated: use IDs instead
IDs []string `yaml:"ids,omitempty"`
Goos string `yaml:",omitempty"`
Goarch string `yaml:",omitempty"`
Expand Down
25 changes: 13 additions & 12 deletions www/docs/deprecations.md
Expand Up @@ -89,9 +89,14 @@ ignore:

If you try to use new versions of GoReleaser with Go 1.15, it will warn about it until this deprecation warning expires.


## Expired deprecation notices

The following options were deprecated in the past and were already removed.

### docker.builds

> since 2021-01-07 (v0.154.0)
> since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0)

`builds` is deprecated in favor of `ids`, since now it also allows to copy nfpm packages:

Expand All @@ -113,7 +118,7 @@ Change this:

### docker.binaries

> since 2021-01-07 (v0.154.0)
> since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0)

`binaries` is deprecated and now does nothing.
If you want to filter something out, use the `ids` property.
Expand All @@ -134,13 +139,9 @@ Change this:
ids: ['foo']
```

## Expired deprecation notices

The following options were deprecated in the past and were already removed.

### nfpms.files

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand All @@ -165,7 +166,7 @@ Change this:

### nfpms.config_files

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`config_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand All @@ -191,7 +192,7 @@ Change this:

### nfpms.symlinks

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`symlinks` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand All @@ -217,7 +218,7 @@ Change this:

### nfpms.rpm.ghost_files

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`rpm.ghost_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand All @@ -244,7 +245,7 @@ Change this:

### nfpms.rpm.config_noreplace_files

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`rpm.config_noreplace_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand Down Expand Up @@ -273,7 +274,7 @@ Change this:

### nfpms.deb.version_metadata

> since 2020-12-21 (v0.149.0)
> since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0)

`deb.version_metadata` is deprecated in favor of `version_metadata` (check [this page](https://goreleaser.com/customization/nfpm/) for more details):

Expand Down