diff options
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/codegen/gen_assists_docs.rs | 4 | ||||
-rw-r--r-- | xtask/src/dist.rs | 10 | ||||
-rw-r--r-- | xtask/src/main.rs | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs index be218dea1..6e18a50a6 100644 --- a/xtask/src/codegen/gen_assists_docs.rs +++ b/xtask/src/codegen/gen_assists_docs.rs | |||
@@ -86,8 +86,8 @@ impl Assist { | |||
86 | 86 | ||
87 | impl fmt::Display for Assist { | 87 | impl fmt::Display for Assist { |
88 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | 88 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
89 | let before = self.before.replace("<|>", "┃"); // Unicode pseudo-graphics bar | 89 | let before = self.before.replace("$0", "┃"); // Unicode pseudo-graphics bar |
90 | let after = self.after.replace("<|>", "┃"); | 90 | let after = self.after.replace("$0", "┃"); |
91 | writeln!( | 91 | writeln!( |
92 | f, | 92 | f, |
93 | "[discrete]\n=== `{}` | 93 | "[discrete]\n=== `{}` |
diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index d59b88131..6bc34106b 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs | |||
@@ -63,8 +63,7 @@ fn dist_server() -> Result<()> { | |||
63 | env::set_var("CC", "clang"); | 63 | env::set_var("CC", "clang"); |
64 | } | 64 | } |
65 | 65 | ||
66 | let toolchain = toolchain(&target); | 66 | cmd!("cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --target {target} --release").run()?; |
67 | cmd!("cargo +{toolchain} build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --target {target} --release").run()?; | ||
68 | 67 | ||
69 | let suffix = exe_suffix(&target); | 68 | let suffix = exe_suffix(&target); |
70 | let src = | 69 | let src = |
@@ -118,13 +117,6 @@ fn exe_suffix(target: &str) -> String { | |||
118 | } | 117 | } |
119 | } | 118 | } |
120 | 119 | ||
121 | fn toolchain(target: &str) -> String { | ||
122 | match target { | ||
123 | "aarch64-apple-darwin" => "beta".to_string(), | ||
124 | _ => "stable".to_string(), | ||
125 | } | ||
126 | } | ||
127 | |||
128 | fn gzip(src_path: &Path, dest_path: &Path) -> Result<()> { | 120 | fn gzip(src_path: &Path, dest_path: &Path) -> Result<()> { |
129 | let mut encoder = GzEncoder::new(File::create(dest_path)?, Compression::best()); | 121 | let mut encoder = GzEncoder::new(File::create(dest_path)?, Compression::best()); |
130 | let mut input = io::BufReader::new(File::open(src_path)?); | 122 | let mut input = io::BufReader::new(File::open(src_path)?); |
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 3e07daae9..dec48629c 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs | |||
@@ -12,7 +12,7 @@ use std::env; | |||
12 | 12 | ||
13 | use codegen::CodegenCmd; | 13 | use codegen::CodegenCmd; |
14 | use pico_args::Arguments; | 14 | use pico_args::Arguments; |
15 | use xshell::pushd; | 15 | use xshell::{cmd, cp, pushd}; |
16 | use xtask::{ | 16 | use xtask::{ |
17 | codegen::{self, Mode}, | 17 | codegen::{self, Mode}, |
18 | dist::DistCmd, | 18 | dist::DistCmd, |
@@ -124,6 +124,13 @@ FLAGS: | |||
124 | args.finish()?; | 124 | args.finish()?; |
125 | MetricsCmd { dry_run }.run() | 125 | MetricsCmd { dry_run }.run() |
126 | } | 126 | } |
127 | "bb" => { | ||
128 | let suffix: String = args.free_from_str()?.unwrap(); | ||
129 | args.finish()?; | ||
130 | cmd!("cargo build --release").run()?; | ||
131 | cp("./target/release/rust-analyzer", format!("./target/rust-analyzer-{}", suffix))?; | ||
132 | Ok(()) | ||
133 | } | ||
127 | _ => { | 134 | _ => { |
128 | eprintln!( | 135 | eprintln!( |
129 | "\ | 136 | "\ |
@@ -141,7 +148,8 @@ SUBCOMMANDS: | |||
141 | install | 148 | install |
142 | lint | 149 | lint |
143 | dist | 150 | dist |
144 | promote" | 151 | promote |
152 | bb" | ||
145 | ); | 153 | ); |
146 | Ok(()) | 154 | Ok(()) |
147 | } | 155 | } |