github.com/ahmet2mir/goreleaser@v0.180.3-0.20210927151101-8e5ee5a9b8c5/www/docs/deprecations.md (about) 1 --- 2 title: Deprecation notices 3 --- 4 5 This page is used to list deprecation notices across GoReleaser. 6 7 Deprecated options will be removed after ~6 months from the time they were 8 deprecated. 9 10 You can check your use of deprecated configurations by running: 11 12 ```sh 13 goreleaser check 14 ``` 15 16 ## Active deprecation notices 17 18 <!-- 19 20 Template for new deprecations: 21 22 ### property 23 24 > since yyyy-mm-dd 25 26 Description. 27 28 === "Before" 29 30 ``` yaml 31 foo: bar 32 ``` 33 34 === "After" 35 ``` yaml 36 foo: bar 37 ``` 38 39 --> 40 41 ### builds for windows/arm64 42 43 > since 2021-08-16 (v0.175.0) 44 45 Since Go 1.17, `windows/arm64` is a valid target. 46 47 Prior to v0.175.0, GoReleaser would just ignore this target. 48 Since in Go 1.17 it is now a valid target, GoReleaser will build it if the Go version being used is 1.17 or later. 49 50 If you want to make sure it is ignored in the future, you need to add this to your build config: 51 52 ```yaml 53 ignore: 54 - goos: windows 55 goarch: arm64 56 ``` 57 58 If you try to use new versions of GoReleaser with Go 1.16 or older, it will warn about it until this deprecation warning expires, after that your build will likely fail. 59 60 ### docker.use_buildx 61 62 > since 2021-06-26 (v0.172.0) 63 64 `use_buildx` is deprecated in favor of the more generalist `use`, since now it also allow other options in the future: 65 66 Change this: 67 68 === "Before" 69 ```yaml 70 dockers: 71 - 72 use_buildx: true 73 ``` 74 75 === "After" 76 ```yaml 77 dockers: 78 - 79 use: buildx 80 ``` 81 82 ### builds for darwin/arm64 83 84 > since 2021-02-17 (v0.157.0) 85 86 Since Go 1.16, `darwin/arm64` is macOS on Apple Silicon instead of `iOS`. 87 88 Prior to v0.156.0, GoReleaser would just ignore this target. 89 Since in Go 1.16 and later it is a valid target, GoReleaser will now build it if the Go version being used is 1.16 or later. 90 91 If you want to make sure it is ignored in the future, you need to add this to your build config: 92 93 ```yaml 94 ignore: 95 - goos: darwin 96 goarch: arm64 97 ``` 98 99 If you try to use new versions of GoReleaser with Go 1.15 or older, it will warn about it until this deprecation warning expires, after that your build will likely fail. 100 101 ## Expired deprecation notices 102 103 The following options were deprecated in the past and were already removed. 104 105 ### Skipping SemVer Validations 106 107 > since 2021-02-28 (v0.158.0), removed 2021-09-22 (v0.180.0) 108 109 GoReleaser skips SemVer validations when run with `--skip-validation` or `--snapshot`. 110 This causes other problems later, such as [invalid Linux packages](https://github.com/goreleaser/goreleaser/issues/2081). 111 Because of that, once this deprecation expires, GoReleaser will hard fail on non-semver versions, as stated on our [limitations page](https://goreleaser.com/limitations/semver/). 112 113 ### docker.builds 114 115 > since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0) 116 117 `builds` is deprecated in favor of `ids`, since now it also allows to copy nfpm packages: 118 119 Change this: 120 121 === "Before" 122 ```yaml 123 dockers: 124 - 125 builds: ['a', 'b'] 126 ``` 127 128 === "After" 129 ```yaml 130 dockers: 131 - 132 ids: ['a', 'b'] 133 ``` 134 135 ### docker.binaries 136 137 > since 2021-01-07 (v0.154.0), removed 2021-08-13 (v0.175.0) 138 139 `binaries` is deprecated and now does nothing. 140 If you want to filter something out, use the `ids` property. 141 142 Change this: 143 144 === "Before" 145 ```yaml 146 dockers: 147 - 148 binaries: ['foo'] 149 ``` 150 151 === "After" 152 ```yaml 153 dockers: 154 - 155 ids: ['foo'] 156 ``` 157 158 ### nfpms.files 159 160 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 161 162 `files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 163 164 Change this: 165 166 === "Before" 167 ```yaml 168 nfpms: 169 - 170 files: 171 foo: bar 172 ``` 173 174 === "After" 175 ```yaml 176 nfpms: 177 - 178 contents: 179 - src: foo 180 dst: bar 181 ``` 182 183 ### nfpms.config_files 184 185 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 186 187 `config_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 188 189 Change this: 190 191 === "Before" 192 ```yaml 193 nfpms: 194 - 195 config_files: 196 foo: bar 197 ``` 198 199 === "After" 200 ```yaml 201 nfpms: 202 - 203 contents: 204 - src: foo 205 dst: bar 206 type: config 207 ``` 208 209 ### nfpms.symlinks 210 211 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 212 213 `symlinks` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 214 215 Change this: 216 217 === "Before" 218 ```yaml 219 nfpms: 220 - 221 symlinks: 222 foo: bar 223 ``` 224 225 === "After" 226 ```yaml 227 nfpms: 228 - 229 contents: 230 - src: foo 231 dst: bar 232 type: symlink 233 ``` 234 235 ### nfpms.rpm.ghost_files 236 237 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 238 239 `rpm.ghost_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 240 241 Change this: 242 243 === "Before" 244 ```yaml 245 nfpms: 246 - 247 rpm: 248 ghost_files: 249 - foo 250 ``` 251 252 === "After" 253 ```yaml 254 nfpms: 255 - 256 contents: 257 - dst: bar 258 type: ghost 259 packager: rpm # optional 260 ``` 261 262 ### nfpms.rpm.config_noreplace_files 263 264 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 265 266 `rpm.config_noreplace_files` is deprecated in favor of `contents` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 267 268 Change this: 269 270 === "Before" 271 ```yaml 272 nfpms: 273 - 274 rpm: 275 config_noreplace_files: 276 foo: bar 277 ``` 278 279 === "After" 280 ```yaml 281 nfpms: 282 - 283 contents: 284 - src: foo 285 dst: bar 286 type: config|noreplace 287 packager: rpm # optional 288 ``` 289 290 291 ### nfpms.deb.version_metadata 292 293 > since 2020-12-21 (v0.149.0), removed 2021-07-26 (v0.172.0) 294 295 `deb.version_metadata` is deprecated in favor of `version_metadata` (check [this page](https://goreleaser.com/customization/nfpm/) for more details): 296 297 Change this: 298 299 === "Before" 300 ```yaml 301 nfpms: 302 - 303 deb: 304 version_metadata: beta1 305 ``` 306 307 === "After" 308 ```yaml 309 nfpms: 310 - 311 version_metadata: beta1 312 ``` 313 314 ### brews.github 315 316 > since 2020-07-06 (v0.139.0), removed 2021-01-04 (v0.152.0) 317 318 GitHub section was deprecated in favour of `tap` which 319 reflects Homebrew's naming convention. GitHub will be picked 320 automatically when GitHub token is passed. 321 322 Change this: 323 324 === "Before" 325 ```yaml 326 brews: 327 - 328 github: 329 owner: goreleaser 330 name: homebrew-tap 331 ``` 332 333 === "After" 334 ```yaml 335 brews: 336 - 337 tap: 338 owner: goreleaser 339 name: homebrew-tap 340 ``` 341 342 ### brews.gitlab 343 344 > since 2020-07-06 (v0.139.0), removed 2021-01-04 (v0.152.0) 345 346 GitLab section was deprecated in favour of `tap` which 347 reflects Homebrew's naming convention. GitLab will be picked 348 automatically when GitLab token is passed. 349 350 Change this: 351 352 === "Before" 353 ```yaml 354 brews: 355 - 356 gitlab: 357 owner: goreleaser 358 name: homebrew-tap 359 ``` 360 361 === "After" 362 ```yaml 363 brews: 364 - 365 tap: 366 owner: goreleaser 367 name: homebrew-tap 368 ``` 369 370 ### puts 371 372 > since 2019-11-15, removed 2020-04-14 (v0.132.0) 373 374 The HTTP upload support was extended to also accept `POST` as a method, 375 so the name `puts` kind of lost its meaning. 376 377 === "Before" 378 379 ``` yaml 380 puts: 381 - ... 382 ``` 383 384 === "After" 385 ``` yaml 386 uploads: 387 - ... 388 ``` 389 390 Also note that secrets environment variable name prefixes have changed from 391 `PUT_` to `UPLOAD_`. 392 393 ### nfpms.name_template 394 395 > since 2019-11-15, removed 2020-04-14 (v0.132.0) 396 397 The `name_template` field was deprecated in favor of a more clear one, 398 `file_name_template`. 399 400 === "Before" 401 ``` yaml 402 nfpms: 403 - name_template: foo 404 ``` 405 406 407 === "After" 408 ``` yaml 409 nfpms: 410 - file_name_template: foo 411 ``` 412 413 ### blob 414 415 > since 2019-08-02, removed 2020-03-22 (v0.130.0) 416 417 Blob was deprecated in favor of its plural form. 418 It was already accepting multiple inputs, but its pluralized now so its more 419 clear. 420 421 === "Before" 422 ```yaml 423 blob: 424 # etc 425 ``` 426 427 === "After" 428 ```yaml 429 blobs: 430 # etc 431 ``` 432 433 ### sign 434 435 > since 2019-07-20, removed 2020-03-22 (v0.130.0) 436 437 Sign was deprecated in favor of its plural form. 438 439 === "Before" 440 ```yaml 441 sign: 442 # etc 443 ``` 444 445 === "After" 446 ```yaml 447 signs: 448 - 449 # etc 450 ``` 451 452 ### brew 453 454 > since 2019-06-09, removed 2020-01-26 (v0.125.0) 455 456 Brew was deprecated in favor of its plural form. 457 458 Change this: 459 460 === "Before" 461 ```yaml 462 brew: 463 # etc 464 ``` 465 466 === "After" 467 ```yaml 468 brews: 469 - 470 # etc 471 ``` 472 473 ### s3 474 475 > since 2019-06-09, removed 2020-01-07 (v0.125.0) 476 477 S3 was deprecated in favor of the new `blob`, which supports S3, Azure Blob and 478 GCS. 479 480 === "Before" 481 ```yaml 482 s3: 483 - 484 # etc 485 ``` 486 487 === "After" 488 ```yaml 489 blobs: 490 - 491 provider: s3 492 # etc 493 ``` 494 495 ACLs should be set on the bucket, the `acl` option does not exist anymore. 496 497 ### archive 498 499 > since 2019-04-16, removed 2019-12-27 (v0.124.0) 500 501 We now allow multiple archives, so the `archive` statement will be removed. 502 503 === "Before" 504 ```yaml 505 archive: 506 format: zip 507 ``` 508 509 === "After" 510 ```yaml 511 archives: 512 - id: foo 513 format: zip 514 ``` 515 516 ### snapcraft 517 518 > since 2019-05-27, removed 2019-12-27 (v0.124.0) 519 520 We now allow multiple Snapcraft configs, so the `snapcraft` statement will be removed. 521 522 === "Before" 523 ```yaml 524 snapcraft: 525 publish: true 526 # ... 527 ``` 528 529 === "After" 530 ```yaml 531 snapcrafts: 532 - 533 publish: true 534 # ... 535 ``` 536 537 ### nfpm 538 539 > since 2019-05-07, removed 2019-12-27 (v0.124.0) 540 541 We now allow multiple NFPM config, so the `nfpm` statement will be removed. 542 543 === "Before" 544 ```yaml 545 nfpm: 546 formats: 547 - deb 548 ``` 549 550 === "After" 551 ```yaml 552 nfpms: 553 - 554 formats: 555 - deb 556 ``` 557 558 ### docker.binary 559 560 > since 2018-10-01, removed 2019-08-02 (v0.114.0) 561 562 You can now create a Docker image with multiple binaries. 563 564 === "Before" 565 ```yaml 566 dockers: 567 - image: foo/bar 568 binary: foo 569 ``` 570 571 === "After" 572 ```yaml 573 dockers: 574 - image: foo/bar 575 binaries: 576 - foo 577 ``` 578 579 ### docker.image 580 581 > since 2018-10-20, removed 2019-08-02 (v0.114.0) 582 583 This property was deprecated in favor of more flexible `image_templates`. 584 The idea is to be able to define several images and tags using templates instead of just one image with tag templates. 585 This flexibility allows images to be pushed to multiple registries. 586 587 === "Before" 588 ```yaml 589 dockers: 590 - image: foo/bar 591 tag_templates: 592 - '{{ .Tag }}' 593 ``` 594 595 === "After" 596 ```yaml 597 dockers: 598 - image_templates: 599 - 'foo/bar:{{ .Tag }}' 600 ``` 601 602 ### docker.tag_templates 603 604 > since 2018-10-20, removed 2019-08-02 (v0.114.0) 605 606 This property was deprecated in favor of more flexible `image_templates`. 607 The idea is to be able to define several images and tags using templates instead of just one image with tag templates. 608 609 === "Before" 610 ```yaml 611 dockers: 612 - image: foo/bar 613 tag_templates: 614 - '{{ .Tag }}' 615 ``` 616 617 === "After" 618 ```yaml 619 dockers: 620 - image_templates: 621 - 'foo/bar:{{ .Tag }}' 622 ``` 623 624 ### git.short_hash 625 626 > since 2018-10-03, removed 2019-01-19 (v0.98.0) 627 628 This property was being used to tell GoReleaser to use short git hashes 629 instead of the full ones. This has been removed in favor of specific 630 template variables (`.FullCommit` and `.ShortCommit`). 631 632 === "Before" 633 ```yaml 634 git: 635 short_hash: true 636 637 fake: 638 foo_template: 'blah {{ .Commit }}' 639 ``` 640 641 === "After" 642 ```yaml 643 fake: 644 foo_template: 'blah {{ .ShortCommit }}' 645 ``` 646 647 ### fpm 648 649 > since 2018-02-17, removed 2017-08-15 (v0.83.0) 650 651 FPM is deprecated in favor of nfpm, which is a simpler alternative written 652 in Go. The objective is to remove the ruby dependency thus simplify the 653 CI/CD pipelines. 654 655 Just replace the `fpm` keyword by `nfpm` in your `.goreleaser.yml` file. 656 657 === "Before" 658 ```yaml 659 fpm: 660 # ... 661 ``` 662 663 === "After" 664 ```yaml 665 nfpm: 666 # ... 667 ``` 668 669 ### docker.tag_template 670 671 > since 2018-01-19, removed 2017-08-15 (v0.83.0) 672 673 This property was deprecated in favor of the pluralized `tag_templates`. 674 The idea is to be able to define several tags instead of just one. 675 676 === "Before" 677 ```yaml 678 dockers: 679 - image: foo/bar 680 tag_template: '{{ .Tag }}' 681 ``` 682 683 === "After" 684 ```yaml 685 dockers: 686 - image: foo/bar 687 tag_templates: 688 - '{{ .Tag }}' 689 ``` 690 691 ### docker.latest 692 693 > since 2018-01-19, removed 2017-08-15 (v0.83.0) 694 695 The `latest` field in Docker config is deprecated in favor of the newer 696 `tag_templates` field. 697 698 === "Before" 699 ```yaml 700 dockers: 701 - image: foo/bar 702 latest: true 703 ``` 704 705 === "After" 706 ```yaml 707 dockers: 708 - image: foo/bar 709 tag_templates: 710 - '{{ .Tag }}' 711 - latest 712 ```