anchor.diff:        parts[0] += 1;
         parts[1] = 0;
         parts[2] = 0;
  +      parts[3] = 0;
  +      parts[4] = 0;
         break;
       case kY:
         parts[1] += 1;
         parts[2] = 0;
  +      parts[3] = 0;
  +      parts[4] = 0;
         break;
       case kZ:
  -      parts[2] += 1;
  +      parts[2] = 0;
  +      parts[3] += 1;
  +      parts[4] = 0;
         break;
       default:
         print('Unknown increment level. The valid values are "$kX", "$kY", and "$kZ".');
         exit(1);
     }
  -  version = parts.join('.');
  +  version = getVersionFromParts(parts);
   
     if (justPrint) {
       print(version);
  
positive.code:       'to the "dev" channel.');
      stdout.write('Are you? [yes/no] ');
      if (stdin.readLineSync() != 'yes') {
        runGit('tag -d v$version', 'remove the tag you did not want to publish');
        print('The dev roll has been aborted.');
        exit(0);
      }
    }
  
    runGit('push $origin v$version', 'publish the version');
    runGit('push $origin HEAD:dev', 'land the new version on the "dev" branch');
    print('Flutter version $version has been rolled to the "dev" channel!');
  }
  
  String getFullTag() {
    return getGitOutput(
      'describe --match v*.*.* --first-parent --long --tags',
      'obtain last released version number',
    );
  }
  
  Match parseFullTag(String version) {
    final RegExp versionPattern = RegExp(r'^v([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)-g([a-f0-9]+)$');
    return versionPattern.matchAsPrefix(version);
  }
  
  String getGitOutput(String command, String explanation) {
  
negative.code:     exit(1);
    }
  
    final List<int> parts = match.groups(<int>[1, 2, 3, 4, 5]).map<int>(int.parse).toList();
  
    if (match.group(6) == '0') {
      print('This commit has already been released, as version ${getVersionFromParts(parts)}.');
      exit(0);
    }
  
  