diff options
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/dist.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index d42faa122..bb3593b11 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs | |||
@@ -27,7 +27,13 @@ fn dist_client(nightly: bool) -> Result<()> { | |||
27 | let _restore = | 27 | let _restore = |
28 | Restore { path: package_json_path.clone(), contents: original_package_json.clone() }; | 28 | Restore { path: package_json_path.clone(), contents: original_package_json.clone() }; |
29 | 29 | ||
30 | let mut package_json = original_package_json.replace(r#""enableProposedApi": true,"#, r#""#); | 30 | let date = run!("date --utc +%Y%m%d")?; |
31 | let version_suffix = if nightly { "-nightly" } else { "" }; | ||
32 | |||
33 | let mut package_json = original_package_json.replace( | ||
34 | r#""version": "0.2.20200211-dev""#, | ||
35 | &format!(r#""version": "0.1.{}{}""#, date, version_suffix), | ||
36 | ); | ||
31 | 37 | ||
32 | if nightly { | 38 | if nightly { |
33 | package_json = package_json.replace( | 39 | package_json = package_json.replace( |
@@ -35,7 +41,7 @@ fn dist_client(nightly: bool) -> Result<()> { | |||
35 | r#""displayName": "rust-analyzer nightly""#, | 41 | r#""displayName": "rust-analyzer nightly""#, |
36 | ); | 42 | ); |
37 | } else { | 43 | } else { |
38 | package_json = original_package_json.replace(r#""enableProposedApi": true,"#, r#""#); | 44 | package_json = package_json.replace(r#""enableProposedApi": true,"#, r#""#); |
39 | } | 45 | } |
40 | fs2::write(package_json_path, package_json)?; | 46 | fs2::write(package_json_path, package_json)?; |
41 | 47 | ||