shadow_rs/
ci.rs

1use std::fmt::{Display, Formatter};
2
3/// [`CiType`] holds the types of CI environment that `shadow-rs` can detect.
4#[derive(Debug, Default)]
5pub enum CiType {
6    Github,
7    Gitlab,
8    // TODO: Recognize other CI types, especially Travis and Jenkins
9    #[default]
10    None,
11}
12
13impl Display for CiType {
14    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
15        match self {
16            CiType::Github => write!(f, "github"),
17            CiType::Gitlab => write!(f, "gitlab"),
18            _ => write!(f, "none"),
19        }
20    }
21}