Rollup merge of #112663 - klensy:dusk-and-dawn, r=pietroalbini

cleanup azure leftovers

Continuation of #97756
This commit is contained in:
Michael Goulet 2023-06-18 13:17:06 -07:00 committed by GitHub
commit 2a85e02428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 9 deletions

View file

@ -4,8 +4,6 @@ use std::process::Command;
pub enum CiEnv {
/// Not a CI environment.
None,
/// The Azure Pipelines environment, for Linux (including Docker), Windows, and macOS builds.
AzurePipelines,
/// The GitHub Actions environment, for Linux (including Docker), Windows and macOS builds.
GitHubActions,
}
@ -13,9 +11,7 @@ pub enum CiEnv {
impl CiEnv {
/// Obtains the current CI environment.
pub fn current() -> CiEnv {
if std::env::var("TF_BUILD").map_or(false, |e| e == "True") {
CiEnv::AzurePipelines
} else if std::env::var("GITHUB_ACTIONS").map_or(false, |e| e == "true") {
if std::env::var("GITHUB_ACTIONS").map_or(false, |e| e == "true") {
CiEnv::GitHubActions
} else {
CiEnv::None