run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
FutureOr? run() async {
final results = argResults;
if (results == null) throw ArgumentError('No arguments provided');
final dartBuild = DartBuild(
appName: results[argAppName] as String?,
appVersion: results[argAppVersion] as String?,
buildMetadata: results[argBuildMetadata] as String?,
buildPreRelease: results[argBuildPreRelease] as String?,
buildArgs: results[argBuildArg] as List<String>,
mainPath: results[argMainPath] as String,
includedPaths: results[argIncludePath] as List<String>,
buildFolder: results[argBuildFolder] as String?,
executableName: results[argExecName] as String?,
releaseFolder: results[argReleaseFolder] as String?,
dartSdkPath: results[argDartSdkPath] as String?,
);
stdout.writeln(await dartBuild.bundle());
}