docs: protected String calculateNextVersion(String fromVersion) {
          // first turn it to release version
          fromVersion = calculateReleaseVersion(fromVersion);
          String nextVersion;
          int lastDotIndex = fromVersion.lastIndexOf('.');
          try {
              if (lastDotIndex != -1) {
                  // probably a major minor version e.g., 2.1.1
                  String minorVersionToken = fromVersion.substring(lastDotIndex + 1);
                  String nextMinorVersion;
                  int lastDashIndex = minorVersionToken.lastIndexOf('-');
                  if (lastDashIndex != -1) {
                      // probably a minor-buildNum e.g., 2.1.1-4 (should change to 2.1.1-5)
                      String buildNumber = minorVersionToken.substring(lastDashIndex + 1);
                      int nextBuildNumber = Integer.parseInt(buildNumber) + 1;
                      nextMinorVersion = minorVersionToken.substring(0, lastDashIndex + 1) + nextBuildNumber;
                  } else {
                      nextMinorVersion = Integer.parseInt(minorVersionToken) + 1 + "";
                  }
                  nextVersion = fromVersion.substring(0, lastDotIndex + 1) + nextMinorVersion;
              } else {
                  // maybe it's just a major version; try to parse as an int
                  int nextMajorVersion = Integer.parseInt(fromVersion) + 1;
                  nextVersion = nextMajorVersion + "";
              }
          } catch (NumberFormatException e) {
              return fromVersion;
          }
          return nextVersion + "-SNAPSHOT";
      }