rust-lang / rust-installer

The Bourne shell installer used by Rust and Cargo
Apache License 2.0
61 stars 68 forks source link

Allow specifying the wanted compression formats at runtime #105

Closed pietroalbini closed 3 years ago

pietroalbini commented 3 years ago

This PR adds the --compression-formats option to the generate, combine and tarball subcommands, allowing to choose one or more output formats to generate. If the flag is not present the default set of formats is generated (gz and xz):

cargo run -- generate --compression-formats=xz ...
cargo run -- generate --compression-formats=gz,xz ...

The combine subcommand is also tweaked to allow combining tarballs compressed using any of the supported formats, instead of only allowing gzip-compressed tarballs.

All of this will allow rustc's CI to choose which formats to generate, and it will allow to easily add new formats in the future.

This PR can be reviewed commit-by-commit. r? @alexcrichton