Auto merge of #12292 - jonas-schievink:bump-extension-version, r=jonas-schievink
internal: Bump extension version
This commit is contained in:
commit
7e95c14ea7
@ -4,7 +4,7 @@
|
|||||||
"description": "Rust language support for Visual Studio Code",
|
"description": "Rust language support for Visual Studio Code",
|
||||||
"private": true,
|
"private": true,
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"version": "0.4.0-dev",
|
"version": "0.5.0-dev",
|
||||||
"releaseTag": null,
|
"releaseTag": null,
|
||||||
"publisher": "rust-lang",
|
"publisher": "rust-lang",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
use crate::{date_iso, flags, project_root};
|
use crate::{date_iso, flags, project_root};
|
||||||
|
|
||||||
|
const VERSION_STABLE: &str = "0.3";
|
||||||
|
const VERSION_NIGHTLY: &str = "0.4";
|
||||||
|
const VERSION_DEV: &str = "0.5"; // keep this one in sync with `package.json`
|
||||||
|
|
||||||
impl flags::Dist {
|
impl flags::Dist {
|
||||||
pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> {
|
pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> {
|
||||||
let stable = sh.var("GITHUB_REF").unwrap_or_default().as_str() == "refs/heads/release";
|
let stable = sh.var("GITHUB_REF").unwrap_or_default().as_str() == "refs/heads/release";
|
||||||
@ -25,10 +29,10 @@ pub(crate) fn run(self, sh: &Shell) -> anyhow::Result<()> {
|
|||||||
|
|
||||||
if let Some(patch_version) = self.client_patch_version {
|
if let Some(patch_version) = self.client_patch_version {
|
||||||
let version = if stable {
|
let version = if stable {
|
||||||
format!("0.2.{}", patch_version)
|
format!("{}.{}", VERSION_STABLE, patch_version)
|
||||||
} else {
|
} else {
|
||||||
// A hack to make VS Code prefer nightly over stable.
|
// A hack to make VS Code prefer nightly over stable.
|
||||||
format!("0.3.{}", patch_version)
|
format!("{}.{}", VERSION_NIGHTLY, patch_version)
|
||||||
};
|
};
|
||||||
let release_tag = if stable { date_iso(sh)? } else { "nightly".to_string() };
|
let release_tag = if stable { date_iso(sh)? } else { "nightly".to_string() };
|
||||||
dist_client(sh, &version, &release_tag, &target)?;
|
dist_client(sh, &version, &release_tag, &target)?;
|
||||||
@ -54,7 +58,10 @@ fn dist_client(
|
|||||||
|
|
||||||
let mut patch = Patch::new(sh, "./package.json")?;
|
let mut patch = Patch::new(sh, "./package.json")?;
|
||||||
patch
|
patch
|
||||||
.replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version))
|
.replace(
|
||||||
|
&format!(r#""version": "{}.0-dev""#, VERSION_DEV),
|
||||||
|
&format!(r#""version": "{}""#, version),
|
||||||
|
)
|
||||||
.replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag))
|
.replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag))
|
||||||
.replace(r#""$generated-start": {},"#, "")
|
.replace(r#""$generated-start": {},"#, "")
|
||||||
.replace(",\n \"$generated-end\": {}", "")
|
.replace(",\n \"$generated-end\": {}", "")
|
||||||
|
Loading…
Reference in New Issue
Block a user