executeStatus method
FutureOr<ReleasePackerCommandStatus>
executeStatus(
- ReleasePacker releasePacker,
- Directory rootDirectory, {
- ReleaseBundle? releaseBundle,
override
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
@override
FutureOr<ReleasePackerCommandStatus> executeStatus(
ReleasePacker releasePacker,
Directory rootDirectory, {
ReleaseBundle? releaseBundle,
}) {
var filePath = joinPaths(rootDirectory.path, path);
// Nothing to delete is already the desired state, NOT an error:
if (!File(filePath).existsSync()) {
print(' » IGNORING delete command> File not found: $filePath');
return ReleasePackerCommandStatus.ignored;
}
return super.executeStatus(
releasePacker,
rootDirectory,
releaseBundle: releaseBundle,
);
}