@Override
 public void afterDevelopmentVersionChange(boolean modified)
     throws IOException, InterruptedException {
   super.afterDevelopmentVersionChange(modified);
   AbstractBuildContext context = AbstractBuildContext.createContextFromMap(configuration);
   AbstractBuildContext.ReleaseManagementContext releaseManagementContext =
       context.releaseManagementContext;
   if (modified) {
     log("Submitting next development version changes");
     perforce.commitWorkingCopy(
         currentChangeListId, releaseManagementContext.getNextDevelopmentComment());
   } else {
     safeRevertWorkingCopy();
     currentChangeListId = perforce.getDefaultChangeListId();
   }
 }
  @Override
  public void afterSuccessfulReleaseVersionBuild() throws IOException, InterruptedException {
    AbstractBuildContext context = AbstractBuildContext.createContextFromMap(configuration);
    AbstractBuildContext.ReleaseManagementContext releaseManagementContext =
        context.releaseManagementContext;
    String labelChangeListId = configuration.get("repository.revision.number");
    if (modifiedFilesForReleaseVersion) {
      log("Submitting release version changes");
      labelChangeListId = currentChangeListId + "";
      perforce.commitWorkingCopy(currentChangeListId, releaseManagementContext.getTagComment());
    } else {
      safeRevertWorkingCopy();
      currentChangeListId = perforce.getDefaultChangeListId();
    }

    if (releaseManagementContext.isCreateVcsTag()) {
      log(
          "Creating label: '"
              + releaseManagementContext.getTagUrl()
              + "' with change list id: "
              + labelChangeListId);
      perforce.createTag(
          releaseManagementContext.getTagUrl(),
          releaseManagementContext.getTagComment(),
          labelChangeListId);
      tagCreated = true;
    }
  }