runPubGet method

void runPubGet(
  1. String projectRootPath
)

Run pub get to ensure that the project is in a runnable state. This may result in pubspec.lock being updated and as we don't allow the project to have any uncommited files we need to commit it. It will almost certainly change if we are doing a multi-package release as the dependencies we are releasing will have their version no.s changed.

Implementation

void runPubGet(String projectRootPath) {
  if (DartSdk().isPubGetRequired(projectRootPath)) {
    /// Make certain the project is in a state that we can run it.
    print(blue("Running 'pub get' to ensure package is ready to publish"));
    DartSdk().runPubGet(projectRootPath, progress: Progress.devNull());
  }
}