From c62f1c762f6d0f08b52a434466915d065c89a753 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 11 Jan 2021 21:39:16 +0300 Subject: [PATCH] Add build benchmark xtask command --- xtask/src/main.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 3e07daae97..dec48629c9 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -12,7 +12,7 @@ use std::env; use codegen::CodegenCmd; use pico_args::Arguments; -use xshell::pushd; +use xshell::{cmd, cp, pushd}; use xtask::{ codegen::{self, Mode}, dist::DistCmd, @@ -124,6 +124,13 @@ FLAGS: args.finish()?; MetricsCmd { dry_run }.run() } + "bb" => { + let suffix: String = args.free_from_str()?.unwrap(); + args.finish()?; + cmd!("cargo build --release").run()?; + cp("./target/release/rust-analyzer", format!("./target/rust-analyzer-{}", suffix))?; + Ok(()) + } _ => { eprintln!( "\ @@ -141,7 +148,8 @@ SUBCOMMANDS: install lint dist - promote" + promote + bb" ); Ok(()) }