aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-04-24 11:36:45 +0100
committerAleksey Kladov <[email protected]>2021-04-24 11:36:45 +0100
commit8d54fd105cbeb159c39fbc803ed45d450f0fe000 (patch)
treef650e0ecf0aa8a9fad8d205471cf1a37b8efda74 /xtask
parent43ea1bb9b96138b7967385260a59ea2c02b1a2f6 (diff)
fix: correct version string to contain hash, build date and channel
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/dist.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs
index 1e26f2ecc..d1c005954 100644
--- a/xtask/src/dist.rs
+++ b/xtask/src/dist.rs
@@ -7,7 +7,7 @@ use std::{
7 7
8use anyhow::Result; 8use anyhow::Result;
9use flate2::{write::GzEncoder, Compression}; 9use flate2::{write::GzEncoder, Compression};
10use xshell::{cmd, cp, mkdir_p, pushd, read_file, rm_rf, write_file}; 10use xshell::{cmd, cp, mkdir_p, pushd, pushenv, read_file, rm_rf, write_file};
11 11
12use crate::{date_iso, project_root}; 12use crate::{date_iso, project_root};
13 13
@@ -26,7 +26,8 @@ impl DistCmd {
26 let release_tag = if self.nightly { "nightly".to_string() } else { date_iso()? }; 26 let release_tag = if self.nightly { "nightly".to_string() } else { date_iso()? };
27 dist_client(&version, &release_tag)?; 27 dist_client(&version, &release_tag)?;
28 } 28 }
29 dist_server()?; 29 let release_channel = if self.nightly { "nightly" } else { "stable" };
30 dist_server(release_channel)?;
30 Ok(()) 31 Ok(())
31 } 32 }
32} 33}
@@ -59,7 +60,8 @@ fn dist_client(version: &str, release_tag: &str) -> Result<()> {
59 Ok(()) 60 Ok(())
60} 61}
61 62
62fn dist_server() -> Result<()> { 63fn dist_server(release_channel: &str) -> Result<()> {
64 let _e = pushenv("RUST_ANALYZER_CHANNEL", release_channel);
63 let target = get_target(); 65 let target = get_target();
64 if target.contains("-linux-gnu") || target.contains("-linux-musl") { 66 if target.contains("-linux-gnu") || target.contains("-linux-musl") {
65 env::set_var("CC", "clang"); 67 env::set_var("CC", "clang");