<commit_before>/*
 *
 *  Copyright 2015 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *
 */
package springfox.gradlebuild.tasks

import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging
import org.gradle.api.tasks.TaskAction
import springfox.gradlebuild.BuildInfo

// git status --porcelain
class ReleaseTask extends DefaultTask {
  private static Logger LOG = Logging.getLogger(ReleaseTask.class);
  public static final String TASK_NAME = 'release'
  String description = 'non snapshot release flow'
  String group = 'release'
  BuildInfo buildInfo

  @TaskAction
  void exec() {
    LOG.info("Pushing annotated tag ${buildInfo.releaseTag}")
    if (buildInfo.dryRun) {
      project.exec {
        commandLine 'git', 'push', "--dry-run", "origin", "${buildInfo.releaseTag}"
      }.assertNormalExitValue()
    } else {
      project.exec {
        commandLine 'git', 'push', "origin", "${buildInfo.releaseTag}"
      }.assertNormalExitValue()
    }
  }
}
<commit_msg>Fixed dryRun of pushing release tag to origin<commit_after>/*
 *
 *  Copyright 2015 the original author or authors.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *
 */
package springfox.gradlebuild.tasks

import org.gradle.api.DefaultTask
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging
import org.gradle.api.tasks.TaskAction
import springfox.gradlebuild.BuildInfo
// git status --porcelain
class ReleaseTask extends DefaultTask {
  private static Logger LOG = Logging.getLogger(ReleaseTask.class);
  public static final String TASK_NAME = 'release'
  String description = 'non snapshot release flow'
  String group = 'release'
  BuildInfo buildInfo

  @TaskAction
  void exec() {
    LOG.info("Pushing annotated tag ${buildInfo.releaseTag}")
    if (buildInfo.dryRun) {
      project.logger.info("Would have executed -> git push origin ${buildInfo.releaseTag}")
    } else {
      project.exec {
        commandLine 'git', 'push', "origin", "${buildInfo.releaseTag}"
      }.assertNormalExitValue()
    }
  }
}

{'fraction_non_alphanumeric': 0.09502831969792322, 'fraction_numerical': 0.005034612964128383, 'mean_word_length': 3.640875912408759, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6988862', 'n_tokens_mistral': 899, 'n_tokens_neox': 872, 'n_words': 312}