branches: support haskell-updates

For the haskell-updates workflow, see

3c3d6bedf0/pkgs/development/haskell-modules/HACKING.md
This commit is contained in:
amesgen 2023-01-07 21:49:28 +01:00 committed by Alyssa Ross
parent e3729eb03b
commit 50bed4a4a9
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -8,10 +8,11 @@ use std::collections::BTreeMap;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use regex::{Regex, RegexSet}; use regex::{Regex, RegexSet};
const NEXT_BRANCH_TABLE: [(&str, &str); 10] = [ const NEXT_BRANCH_TABLE: [(&str, &str); 11] = [
(r"\Astaging\z", "staging-next"), (r"\Astaging\z", "staging-next"),
(r"\Astaging-next\z", "master"), (r"\Astaging-next\z", "master"),
(r"\Astaging-next-([\d.]+)\z", "release-$1"), (r"\Astaging-next-([\d.]+)\z", "release-$1"),
(r"\Ahaskell-updates\z", "master"),
(r"\Amaster\z", "nixpkgs-unstable"), (r"\Amaster\z", "nixpkgs-unstable"),
(r"\Amaster\z", "nixos-unstable-small"), (r"\Amaster\z", "nixos-unstable-small"),
(r"\Anixos-(.*)-small\z", "nixos-$1"), (r"\Anixos-(.*)-small\z", "nixos-$1"),
@ -147,6 +148,13 @@ mod tests {
assert_eq!(res, vec!["release-21.05"]); assert_eq!(res, vec!["release-21.05"]);
} }
#[test]
fn haskell_updates() {
let branch = "haskell-updates";
let next = next_branches(branch);
assert_eq!(next, vec!["master"]);
}
#[test] #[test]
fn release_20_09() { fn release_20_09() {
let res = next_branches("release-20.09"); let res = next_branches("release-20.09");