current property
Vendor?
current
Returns the current CI Vendor or null
if no CI vendor detected (e.g. not running on CI).
Implementation
static Vendor? get current {
if (IS_CODEBUILD) {
return Vendor._(
'AWS CodeBuild',
false,
);
}
if (IS_APPVEYOR) {
return Vendor._(
'AppVeyor',
Platform.environment.containsKey('APPVEYOR_PULL_REQUEST_NUMBER'),
);
}
if (IS_APPCIRCLE) {
return Vendor._(
'Appcircle',
false,
);
}
if (IS_AZURE_PIPELINES) {
return Vendor._(
'Azure Pipelines',
Platform.environment.containsKey('SYSTEM_PULLREQUEST_PULLREQUESTID'),
);
}
if (IS_BAMBOO) {
return Vendor._(
'Bamboo',
false,
);
}
if (IS_BITBUCKET) {
return Vendor._(
'Bitbucket Pipelines',
Platform.environment.containsKey('BITBUCKET_PR_ID'),
);
}
if (IS_BITRISE) {
return Vendor._(
'Bitrise',
Platform.environment.containsKey('BITRISE_PULL_REQUEST'),
);
}
if (IS_BUDDY) {
return Vendor._(
'Buddy',
Platform.environment.containsKey('BUDDY_EXECUTION_PULL_REQUEST_ID'),
);
}
if (IS_BUILDKITE) {
return Vendor._(
'Buildkite',
Platform.environment['BUILDKITE_PULL_REQUEST'] != 'false',
);
}
if (IS_CIRCLE) {
return Vendor._(
'CircleCI',
Platform.environment.containsKey('CIRCLE_PULL_REQUEST'),
);
}
if (IS_CIRRUS) {
return Vendor._(
'Cirrus CI',
Platform.environment.containsKey('CIRRUS_PR'),
);
}
if (IS_CODEFRESH) {
return Vendor._(
'Codefresh',
Platform.environment.containsKey("CF_PULL_REQUEST_NUMBER") ||
Platform.environment.containsKey("CF_PULL_REQUEST_ID"),
);
}
if (IS_CODEMAGIC) {
return Vendor._(
'Codemagic',
Platform.environment['FCI_PULL_REQUEST'] != 'false',
);
}
if (IS_CODESHIP) {
return Vendor._(
'Codeship',
false,
);
}
if (IS_DRONE) {
return Vendor._(
'Drone',
Platform.environment["DRONE_BUILD_EVENT"] == "pull_request",
);
}
if (IS_EAS) {
return Vendor._(
'Expo Application Services',
false,
);
}
if (IS_GITHUB_ACTIONS) {
return Vendor._(
'GitHub Actions',
Platform.environment["GITHUB_EVENT_NAME"] == "pull_request",
);
}
if (IS_GITLAB) {
return Vendor._(
'GitLab CI',
Platform.environment.containsKey('CI_MERGE_REQUEST_ID'),
);
}
if (IS_GOCD) {
return Vendor._(
'GoCD',
false,
);
}
if (IS_HUDSON) {
return Vendor._(
'Hudson',
false,
);
}
if (IS_JENKINS) {
return Vendor._(
'Jenkins',
Platform.environment.containsKey("ghprbPullId") ||
Platform.environment.containsKey("CHANGE_ID"),
);
}
if (IS_LAYERCI) {
return Vendor._(
'LayerCI',
Platform.environment.containsKey('LAYERCI_PULL_REQUEST'),
);
}
if (IS_MAGNUM) {
return Vendor._(
'Magnum CI',
false,
);
}
if (IS_NETLIFY) {
return Vendor._(
'Netlify CI',
Platform.environment['PULL_REQUEST'] != 'false',
);
}
if (IS_NEVERCODE) {
return Vendor._(
'Nevercode',
Platform.environment['NEVERCODE_PULL_REQUEST'] != 'false',
);
}
if (IS_RENDER) {
return Vendor._(
'Render',
Platform.environment["IS_PULL_REQUEST"] == "true",
);
}
if (IS_SAIL) {
return Vendor._(
'Sail CI',
Platform.environment.containsKey('SAIL_PULL_REQUEST_NUMBER'),
);
}
if (IS_SCREWDRIVER) {
return Vendor._(
'Screwdriver',
Platform.environment['SD_PULL_REQUEST'] != 'false',
);
}
if (IS_SEMAPHORE) {
return Vendor._(
'Semaphore',
Platform.environment.containsKey('PULL_REQUEST_NUMBER'),
);
}
if (IS_SHIPPABLE) {
return Vendor._(
'Shippable',
Platform.environment["IS_PULL_REQUEST"] == "true",
);
}
if (IS_SOLANO) {
return Vendor._(
'Solano CI',
Platform.environment.containsKey('TDDIUM_PR_ID'),
);
}
if (IS_STRIDER) {
return Vendor._(
'Strider CD',
false,
);
}
if (IS_TASKCLUSTER) {
return Vendor._(
'TaskCluster',
false,
);
}
if (IS_TEAMCITY) {
return Vendor._(
'TeamCity',
false,
);
}
if (IS_TRAVIS) {
return Vendor._(
'Travis CI',
Platform.environment['TRAVIS_PULL_REQUEST'] != 'false',
);
}
if (IS_VERCEL) {
return Vendor._(
'Vercel',
false,
);
}
if (IS_APPCENTER) {
return Vendor._(
'Visual Studio App Center',
false,
);
}
if (IS_DSARI) {
return Vendor._(
'dsari',
false,
);
}
return null;
}