Skip to content

Commit

Permalink
Fixing travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Feb 5, 2014
1 parent c22a489 commit bbfce5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sbt-test/rpm/scriptlets-rpm/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) =>

TaskKey[Unit]("check-rpm-version") <<= (target, streams) map { (target, out) =>
val fullRpmVersion = Process("rpm", Seq("--version")) !!
val rpmVersion = fullRpmVersion stripPrefix "RPM-Version "
val firstDigit = fullRpmVersion indexWhere Character.isDigit
val rpmVersion = fullRpmVersion substring firstDigit
out.log.info("Found rpmVersion: " + rpmVersion)
val (major, minor, patch) = rpmVersion.trim.split("\\.").map(_.toInt) match {
case Array(major) => (major, 0, 0)
Expand Down

0 comments on commit bbfce5b

Please sign in to comment.