fetchTags method

Future<List<String>> fetchTags(
  1. String localCheckoutDirectory
)

Lists all the tags of a directory by executing the git tag -l command. Returns a List<String> that contains the retrieved tags. localCheckoutDirectory - the local GIT directory to retrieve the tags. In case of success, will return a list with a tag name on each position, whereas in case of failure will return an empty list.

Implementation

Future<List<String>> fetchTags(String localCheckoutDirectory) async {
  ProcessResult processResult = await git_service.runGit(['tag', '-l'],
      echoOutput: false, processWorkingDir: localCheckoutDirectory);

  List<String> tags = RwGitParser.parseGitStdoutBasedOnNewLine(
      processResult.stdout.toString());
  return tags;
}