executeStatus method

FutureOr<ReleasePackerCommandStatus> executeStatus(
  1. ReleasePacker releasePacker,
  2. Directory rootDirectory, {
  3. ReleaseBundle? releaseBundle,
})

Executes this command returning its ReleasePackerCommandStatus.

The default implementation maps execute: true to ReleasePackerCommandStatus.ok and false to ReleasePackerCommandStatus.error. Commands that can be skipped without failing the build override this to return ReleasePackerCommandStatus.ignored.

Implementation

FutureOr<ReleasePackerCommandStatus> executeStatus(
  ReleasePacker releasePacker,
  Directory rootDirectory, {
  ReleaseBundle? releaseBundle,
}) {
  var ok = execute(
    releasePacker,
    rootDirectory,
    releaseBundle: releaseBundle,
  );

  return ok is Future<bool> ? ok.then(_toStatus) : _toStatus(ok);
}