mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
Rename rls component to rls-preview on nightly
This commit is contained in:
parent
c5cad5a78d
commit
c0ea270f70
@ -1098,13 +1098,8 @@ impl Step for Rls {
|
|||||||
.arg("--output-dir").arg(&distdir(build))
|
.arg("--output-dir").arg(&distdir(build))
|
||||||
.arg("--non-installed-overlay").arg(&overlay)
|
.arg("--non-installed-overlay").arg(&overlay)
|
||||||
.arg(format!("--package-name={}-{}", name, target))
|
.arg(format!("--package-name={}-{}", name, target))
|
||||||
.arg("--legacy-manifest-dirs=rustlib,cargo");
|
.arg("--legacy-manifest-dirs=rustlib,cargo")
|
||||||
|
.arg("--component-name=rls-preview");
|
||||||
if build.config.channel == "nightly" {
|
|
||||||
cmd.arg("--component-name=rls");
|
|
||||||
} else {
|
|
||||||
cmd.arg("--component-name=rls-preview");
|
|
||||||
}
|
|
||||||
|
|
||||||
build.run(&mut cmd);
|
build.run(&mut cmd);
|
||||||
distdir(build).join(format!("{}-{}.tar.gz", name, target))
|
distdir(build).join(format!("{}-{}.tar.gz", name, target))
|
||||||
@ -1333,12 +1328,8 @@ impl Step for Extended {
|
|||||||
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target))
|
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target))
|
||||||
.join(format!("rust-std-{}", target)),
|
.join(format!("rust-std-{}", target)),
|
||||||
&exe.join("rust-std"));
|
&exe.join("rust-std"));
|
||||||
let rls_path = if build.config.channel == "nightly" {
|
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview"),
|
||||||
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls")
|
&exe.join("rls"));
|
||||||
} else {
|
|
||||||
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview")
|
|
||||||
};
|
|
||||||
cp_r(&rls_path, &exe.join("rls"));
|
|
||||||
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target))
|
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target))
|
||||||
.join(format!("rust-analysis-{}", target)),
|
.join(format!("rust-analysis-{}", target)),
|
||||||
&exe.join("rust-analysis"));
|
&exe.join("rust-analysis"));
|
||||||
|
@ -108,6 +108,7 @@ struct Manifest {
|
|||||||
manifest_version: String,
|
manifest_version: String,
|
||||||
date: String,
|
date: String,
|
||||||
pkg: BTreeMap<String, Package>,
|
pkg: BTreeMap<String, Package>,
|
||||||
|
renames: BTreeMap<String, Rename>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
@ -117,6 +118,11 @@ struct Package {
|
|||||||
target: BTreeMap<String, Target>,
|
target: BTreeMap<String, Target>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct Rename {
|
||||||
|
to: String,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct Target {
|
struct Target {
|
||||||
available: bool,
|
available: bool,
|
||||||
@ -236,6 +242,7 @@ impl Builder {
|
|||||||
manifest_version: "2".to_string(),
|
manifest_version: "2".to_string(),
|
||||||
date: self.date.to_string(),
|
date: self.date.to_string(),
|
||||||
pkg: BTreeMap::new(),
|
pkg: BTreeMap::new(),
|
||||||
|
renames: BTreeMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
self.package("rustc", &mut manifest.pkg, HOSTS);
|
self.package("rustc", &mut manifest.pkg, HOSTS);
|
||||||
@ -244,14 +251,11 @@ impl Builder {
|
|||||||
self.package("rust-std", &mut manifest.pkg, TARGETS);
|
self.package("rust-std", &mut manifest.pkg, TARGETS);
|
||||||
self.package("rust-docs", &mut manifest.pkg, TARGETS);
|
self.package("rust-docs", &mut manifest.pkg, TARGETS);
|
||||||
self.package("rust-src", &mut manifest.pkg, &["*"]);
|
self.package("rust-src", &mut manifest.pkg, &["*"]);
|
||||||
let rls_package_name = if self.rust_release == "nightly" {
|
self.package("rls-preview", &mut manifest.pkg, HOSTS);
|
||||||
"rls"
|
|
||||||
} else {
|
|
||||||
"rls-preview"
|
|
||||||
};
|
|
||||||
self.package(rls_package_name, &mut manifest.pkg, HOSTS);
|
|
||||||
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
|
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
|
||||||
|
|
||||||
|
manifest.renames.insert("rls".to_owned(), Rename { to: "rls-preview".to_owned() });
|
||||||
|
|
||||||
let mut pkg = Package {
|
let mut pkg = Package {
|
||||||
version: self.cached_version("rust").to_string(),
|
version: self.cached_version("rust").to_string(),
|
||||||
git_commit_hash: self.cached_git_commit_hash("rust").clone(),
|
git_commit_hash: self.cached_git_commit_hash("rust").clone(),
|
||||||
@ -287,7 +291,7 @@ impl Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extensions.push(Component {
|
extensions.push(Component {
|
||||||
pkg: rls_package_name.to_string(),
|
pkg: "rls-preview".to_string(),
|
||||||
target: host.to_string(),
|
target: host.to_string(),
|
||||||
});
|
});
|
||||||
extensions.push(Component {
|
extensions.push(Component {
|
||||||
@ -319,7 +323,7 @@ impl Builder {
|
|||||||
}
|
}
|
||||||
manifest.pkg.insert("rust".to_string(), pkg);
|
manifest.pkg.insert("rust".to_string(), pkg);
|
||||||
|
|
||||||
return manifest
|
return manifest;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn package(&mut self,
|
fn package(&mut self,
|
||||||
|
Loading…
Reference in New Issue
Block a user