mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-27 11:43:40 +00:00
Read beta version from "version" file
This commit is contained in:
parent
d166cffcf9
commit
bf4b0f6a4e
50
debian/patches/d-read-beta-version-from-file.patch
vendored
Normal file
50
debian/patches/d-read-beta-version-from-file.patch
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
--- a/src/bootstrap/lib.rs
|
||||
+++ b/src/bootstrap/lib.rs
|
||||
@@ -883,41 +883,13 @@
|
||||
return s
|
||||
}
|
||||
|
||||
- let beta = output(
|
||||
- Command::new("git")
|
||||
- .arg("ls-remote")
|
||||
- .arg("origin")
|
||||
- .arg("beta")
|
||||
- .current_dir(&self.src)
|
||||
- );
|
||||
- let beta = beta.trim().split_whitespace().next().unwrap();
|
||||
- let master = output(
|
||||
- Command::new("git")
|
||||
- .arg("ls-remote")
|
||||
- .arg("origin")
|
||||
- .arg("master")
|
||||
- .current_dir(&self.src)
|
||||
- );
|
||||
- let master = master.trim().split_whitespace().next().unwrap();
|
||||
-
|
||||
- // Figure out where the current beta branch started.
|
||||
- let base = output(
|
||||
- Command::new("git")
|
||||
- .arg("merge-base")
|
||||
- .arg(beta)
|
||||
- .arg(master)
|
||||
- .current_dir(&self.src),
|
||||
- );
|
||||
- let base = base.trim();
|
||||
-
|
||||
- // Next figure out how many merge commits happened since we branched off
|
||||
- // beta. That's our beta number!
|
||||
+ // Debian: read beta number from "version" file, this is only available
|
||||
+ // in the rustc upstream tarballs and not their git
|
||||
let count = output(
|
||||
- Command::new("git")
|
||||
- .arg("rev-list")
|
||||
- .arg("--count")
|
||||
- .arg("--merges")
|
||||
- .arg(format!("{}...HEAD", base))
|
||||
+ Command::new("sed")
|
||||
+ .arg("-re")
|
||||
+ .arg(r"s/[0-9]+.[0-9]+.[0-9]+-beta.([0-9]+) \(.*\)/\1/g")
|
||||
+ .arg("version")
|
||||
.current_dir(&self.src),
|
||||
);
|
||||
let n = count.trim().parse().unwrap();
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -33,3 +33,4 @@ d-no-web-dependencies-in-doc.patch
|
||||
|
||||
# Work around for some porterboxes, keep this commented
|
||||
#d-host-duplicates.patch
|
||||
d-read-beta-version-from-file.patch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user