Skip to content

Commit 4bb98e7

Browse files
authored
Merge pull request #255 from lrytz/ci-release
Use version set by sbt-dynver, not by parsing travis tag
2 parents 880cc53 + cb51ca9 commit 4bb98e7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

build.sbt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ lazy val dontPublish = Seq(
281281
)
282282

283283
val travisScalaVersion = sys.env.get("TRAVIS_SCALA_VERSION").flatMap(Version.parse)
284-
val releaseVersion = sys.env.get("TRAVIS_TAG").flatMap(Version.parse)
284+
val isTravisTag = sys.env.get("TRAVIS_TAG").map(_.nonEmpty).getOrElse(false)
285285
val isScalaJs = sys.env.get("SCALAJS_VERSION").map(_.nonEmpty).getOrElse(false)
286286
val isScalaNative = sys.env.get("SCALANATIVE_VERSION").map(_.nonEmpty).getOrElse(false)
287287
val isScalafix = sys.env.get("TEST_SCALAFIX").nonEmpty
@@ -339,11 +339,8 @@ inThisBuild(
339339
compatProject
340340
}
341341

342-
val setPublishVersion =
343-
releaseVersion.map("set every version := \"" + _ + "\"").toList
344-
345342
val publishTask =
346-
if (releaseVersion.nonEmpty && !isBinaryCompat && jdkVersion == Some(8)) {
343+
if (isTravisTag && !isBinaryCompat && jdkVersion == Some(8)) {
347344
// we cannot run "ci-release" because that reads the `CI_RELEASE` / `CI_SONATYPE_RELEASE`
348345
// env vars, which we cannot modify from java (easily). so we inline what this command does.
349346
CiReleasePlugin.setupGpg()
@@ -361,7 +358,6 @@ inThisBuild(
361358
}
362359

363360
Seq(
364-
setPublishVersion,
365361
List(s"$projectPrefix/clean"),
366362
if (isScalaNative) List() else List(s"$testProjectPrefix/test"),
367363
List(s"$projectPrefix/publishLocal"),

0 commit comments

Comments
 (0)