clearCurrentState method

Future<void> clearCurrentState(
  1. String projectPath, {
  2. bool dryRun = false,
})

Removes current state file upon complete clean release finalization.

Implementation

Future<void> clearCurrentState(
  String projectPath, {
  bool dryRun = false,
}) async {
  if (dryRun) return;
  final filePath = getCurrentStateFilePath(projectPath);
  final file = File(filePath);
  if (await file.exists()) {
    await file.delete();
  }
}