axodotdev / cargo-dist

📦 shippable application packaging
https://axodotdev.github.io/cargo-dist/
Apache License 2.0
1.52k stars 72 forks source link

how to custom zip file name? #1371

Open bestgopher opened 2 months ago

bestgopher commented 2 months ago

Hello, I want the generated .zip file name to be in the form xxx-darwin-amd64.zip. Can I achieve this through configuration?

Gankra commented 2 months ago

This currently isn't supported, but I think the code is surprisingly well factored for it, in the sense that we generally avoid anything building up an artifact name from first principles, and instead require it to compute a target triple and look it up from there. This is yet another entry in "we should introduce some kind of templating syntax for certain configs" (like {name}-{version}-{tag}-{target}{ext}).

Although actually this specific pattern is trickier, because it's using a completely different target naming scheme than we use (e.g. "amd64" isn't even a particle we ever use). I believe this is the target format that Go developers like using? We'd need either need some very harrowing configuration to support that... or just a hardcoded "use go target triples" setting? Tricky.