execute method

  1. @override
bool execute(
  1. ReleasePacker releasePacker,
  2. Directory rootDirectory, {
  3. ReleaseBundle? releaseBundle,
  4. int expectedExitCode = 0,
})
override

Implementation

@override
bool execute(
  ReleasePacker releasePacker,
  Directory rootDirectory, {
  ReleaseBundle? releaseBundle,
  int expectedExitCode = 0,
}) {
  var ok = super.execute(
    releasePacker,
    rootDirectory,
    releaseBundle: releaseBundle,
    expectedExitCode: expectedExitCode,
  );
  if (!ok) return false;

  var executable = File(pack_path.join(rootDirectory.path, executablePath));
  if (!executable.existsSync()) {
    print("  ▒  Can't find the built executable: ${executable.path}");
    return false;
  }

  print(
    '   »  Built bundle: ${pack_path.join(rootDirectory.path, bundlePath)}',
  );

  if (launcher) {
    writeLauncher(rootDirectory);
  }

  return true;
}