repoHasPublishStepProgress function

bool repoHasPublishStepProgress(
  1. Directory repoDir
)

Whether repoDir's own .gg/publish_state.json records completed publish steps — i.e. gg do publish already did irreversible work in that repo.

Such a repository is never skipped: its version is bumped and possibly uploaded, so leaving it out would strand a prepared release forever.

Implementation

bool repoHasPublishStepProgress(Directory repoDir) {
  try {
    return gg.loadRepoPublishFiles(repoDir).state.hasStepProgress;
  } catch (_) {
    // An unreadable file cannot prove progress.
    return false;
  }
}