Viewing version 0.1.0. Open the latest package page.

ci

0.1.0

Detect whether you're running in a CI environment and information about the CI vendor.

Download archive

Readme

Documentation • License


About

Example:

import 'package:ci/ci.dart' as ci;

Future<void> main() async {
  print(ci.isCI);
  print(ci.isPullRequest);
  print(ci.currentVendor);
  print(ci.currentVendor?.name);
  print(ci.currentVendor?.isPullRequest);
  print(ci.Vendor.IS_GITHUB_ACTIONS);
}

Adding support for a new CI vendor

The default CI vendors list is sourced from watson/ci-info, with an additional local vendors.json file that allows adding new vendors or overriding vendors from the default CI vendors list.

In most cases, you should make changes to the local vendors.json file and send a PR to add in support. Run dart generator/generate_vendors.dart before submitting your PR to update the generated vendor.g.dart file.


Changelog

0.1.0

  • Initial version.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'ci:0.1.0'
pubspec.yaml
name: ci
description: Detect whether you're running in a CI environment and information about the CI vendor.
version: 0.1.0
repository: https://github.com/invertase/dart-cli-utilities/tree/main/packages/ci

environment:
  sdk: ">=2.12.0 <3.0.0"

dev_dependencies:
  http: ^0.13.4
  test: ^1.16.0

Version history

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownload145d095c…adca13

Dependencies

No direct dependencies declared.