Skip to content

Commit 67f4381

Browse files
committed
rust: add command for producing tar.gz install only archives
This is needed to replace `prune-distribution.py`, which we recently deleted. And this has to live outside the fetch process because we produce the Apple aarch64 pgo+lto builds locally since GitHub Actions doesn't yet offer Apple Silicon machines.
1 parent 9e3478d commit 67f4381

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ fn main_impl() -> Result<()> {
6969
),
7070
);
7171

72+
let app = app.subcommand(
73+
Command::new("convert-install-only")
74+
.about("Convert a .tar.zst archive to an install_only tar.gz archive")
75+
.arg(
76+
Arg::new("path")
77+
.required(true)
78+
.takes_value(true)
79+
.help("Path of archive to convert"),
80+
),
81+
);
82+
7283
let app = app.subcommand(
7384
Command::new("upload-release-distributions")
7485
.about("Upload release distributions to a GitHub release")
@@ -141,6 +152,15 @@ fn main_impl() -> Result<()> {
141152
let matches = app.get_matches();
142153

143154
match matches.subcommand() {
155+
Some(("convert-install-only", args)) => {
156+
let path = args.value_of("path").expect("path argument is required");
157+
158+
let dest_path =
159+
crate::release::produce_install_only(std::path::PathBuf::from(path).as_path())?;
160+
println!("wrote {}", dest_path.display());
161+
162+
Ok(())
163+
}
144164
Some(("fetch-release-distributions", args)) => {
145165
tokio::runtime::Builder::new_current_thread()
146166
.enable_all()

0 commit comments

Comments
 (0)