<commit_before>object Release {

  import sbt.Keys._
  import sbt._

  // we hide the existing definition for setReleaseVersion to replace it with our own

  import sbtrelease.ReleaseStateTransformations.{setReleaseVersion => _, _}
  import sbtrelease.ReleasePlugin.autoImport._
  import sbtrelease._

  def setVersionOnly(selectVersion: Versions => String): ReleaseStep = { st: State =>
    val vs = st.get(ReleaseKeys.versions).getOrElse(sys.error("No versions are set! Was this release part executed before inquireVersions?"))
    val selected = selectVersion(vs)

    st.log.info("Setting version to '%s'." format selected)
    val useGlobal = Project.extract(st).get(releaseUseGlobalVersion)
    val versionStr = (if (useGlobal) globalVersionString else versionString) format selected

    reapply(Seq(
      if (useGlobal) version in ThisBuild := selected
      else version := selected
    ), st)
  }

  lazy val setReleaseVersion: ReleaseStep = setVersionOnly(_._1)

  val showNextVersion = settingKey[String]("the future version once releaseNextVersion has been applied to it")
  val showReleaseVersion = settingKey[String]("the version once releaseVersion has been applied to it")

  def settings(toPublish: Project*) = {
    val publishSteps = toPublish.map(p => ReleaseStep(releaseStepTask(publish in p)))

    val prepareSteps: Seq[ReleaseStep] = Seq(
      checkSnapshotDependencies,
      releaseStepCommand(ExtraReleaseCommands.initialVcsChecksCommand),
      inquireVersions,
      setReleaseVersion,
      tagRelease)

    val dockerPublishSteps: Seq[ReleaseStep] = Seq(
      releaseStepCommand("core/docker:publish"),
      releaseStepCommand("resolver/docker:publish"),
      releaseStepCommand("webserver/docker:publish")
    )

    val allSteps = prepareSteps ++ publishSteps ++ (pushChanges +: dockerPublishSteps)

    Seq(
      showReleaseVersion <<= (version, releaseVersion)((v,f)=>f(v)),
      showNextVersion <<= (version, releaseNextVersion)((v,f)=>f(v)),

      releaseVersion <<= releaseVersionBump (bumper=>{
        ver => Version(ver)
          .map(_.withoutQualifier)
          .map(_.bump(bumper).string).getOrElse(versionFormatError)
      }),

      releaseIgnoreUntrackedFiles := true,

      releaseProcess := allSteps
    )
  }
}<commit_msg>remove docker publish, publish with tc<commit_after>object Release {

  import sbt.Keys._
  import sbt._

  // we hide the existing definition for setReleaseVersion to replace it with our own

  import sbtrelease.ReleaseStateTransformations.{setReleaseVersion => _, _}
  import sbtrelease.ReleasePlugin.autoImport._
  import sbtrelease._

  def setVersionOnly(selectVersion: Versions => String): ReleaseStep = { st: State =>
    val vs = st.get(ReleaseKeys.versions).getOrElse(sys.error("No versions are set! Was this release part executed before inquireVersions?"))
    val selected = selectVersion(vs)

    st.log.info("Setting version to '%s'." format selected)
    val useGlobal = Project.extract(st).get(releaseUseGlobalVersion)
    val versionStr = (if (useGlobal) globalVersionString else versionString) format selected

    reapply(Seq(
      if (useGlobal) version in ThisBuild := selected
      else version := selected
    ), st)
  }

  lazy val setReleaseVersion: ReleaseStep = setVersionOnly(_._1)

  val showNextVersion = settingKey[String]("the future version once releaseNextVersion has been applied to it")
  val showReleaseVersion = settingKey[String]("the version once releaseVersion has been applied to it")

  def settings(toPublish: Project*) = {
    val publishSteps = toPublish.map(p => ReleaseStep(releaseStepTask(publish in p)))

    val prepareSteps: Seq[ReleaseStep] = Seq(
      checkSnapshotDependencies,
      releaseStepCommand(ExtraReleaseCommands.initialVcsChecksCommand),
      inquireVersions,
      setReleaseVersion,
      tagRelease)

    // Disabled for now, this is done by team city directly
    val dockerPublishSteps: Seq[ReleaseStep] = Seq(
      releaseStepCommand("core/docker:publish"),
      releaseStepCommand("resolver/docker:publish"),
      releaseStepCommand("webserver/docker:publish")
    )

    val allSteps = prepareSteps ++ publishSteps :+ pushChanges

    Seq(
      showReleaseVersion <<= (version, releaseVersion)((v,f)=>f(v)),
      showNextVersion <<= (version, releaseNextVersion)((v,f)=>f(v)),

      releaseVersion <<= releaseVersionBump (bumper=>{
        ver => Version(ver)
          .map(_.withoutQualifier)
          .map(_.bump(bumper).string).getOrElse(versionFormatError)
      }),

      releaseIgnoreUntrackedFiles := true,

      releaseProcess := allSteps
    )
  }
}
{'fraction_non_alphanumeric': 0.10148995897214425, 'fraction_numerical': 0.0004318721658389117, 'mean_word_length': 4.051254089422028, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2092037', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1281, 'n_words': 322}