goreleaser / nfpm

nFPM is Not FPM - a simple deb, rpm, apk, ipk, and arch linux packager written in Go
https://nfpm.goreleaser.com/
MIT License
2.14k stars 156 forks source link

Support env var expansion for `contents.src` #719

Closed AlekSi closed 11 months ago

AlekSi commented 11 months ago

Is your feature request related to a problem? Please describe.

I have a directory structure produced by Docker/BuildKit multi-platform build:

tmp/build/
├── linux_amd64
│   └── my-bin
└── linux_arm64
    └── my-bin

I want to be able to use the single nfpm.yml configuration file for both architectures. Unfortunately, it is not possible to use environment variable expansion in contents.src.

Describe the solution you'd like

arch: ${ARCH}
contents:
  - src: tmp/build/linux_${ARCH}/my-bin
    dst: /usr/bin/my-bin

Describe alternatives you've considered

Using multiple nfpm.yml files. Using external templates. I would like to avoid both those alternatives.

Search

Code of Conduct

Additional context

I should be able to contribute that change if that's something you want to have.

caarlos0 commented 11 months ago

hey, thanks for the suggestion!

see #721

AlekSi commented 11 months ago

Thank you!

AlekSi commented 10 months ago

It would be nice to have it released :)

caarlos0 commented 10 months ago

released, sorry for the delay