Permalink
Browse files

fix for setting project version in the scope properly

  • Loading branch information...
szimano committed Feb 16, 2015
1 parent 1e02498 commit e7b021a149c8a046af2b807e7c33f880c787595d
Showing with 5 additions and 4 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 .travis.yml
  3. +3 −2 project/Build.scala
View
@@ -27,4 +27,4 @@ project/plugins/project/
.DS_Store
.project.version.sh
.run.central.synchro.sh
View
@@ -2,7 +2,7 @@ language: scala
scala:
- 2.11.5
after_success:
- sh "$TRAVIS_BUILD_DIR/.travis.credentials.sh" && sbt publish && sbt makeVersionSh && sh .project.version.sh && sh .central.synchro.sh
- sh "$TRAVIS_BUILD_DIR/.travis.credentials.sh" && sbt publish && sbt makeVersionSh && sh .run.central.synchro.sh
env:
global:
- secure: rI0yiqoisNVKhH/ofJ00Ymj47Uw4FYvxhiNmCv5LObfu6dQQohaMi9BAVzpr+aVvBeXfWT5As9giTuDZfcxkHoXXMM0VIEgp5XpLxRFDOJBmvgagJqN/tM22yU3aDexQm/ORBpETLnYtvbazbo6q7fYT+pfc8HEtu8BfbpLe4ro=
View
@@ -64,7 +64,7 @@ object SuplerBuild extends Build {
settings = buildSettings ++ Seq(publishArtifact := false)
) aggregate(supler, suplerjs, examples)
lazy val makeVersionSh = taskKey[Seq[File]]("Creates .project.version.sh file.")
lazy val makeVersionSh = taskKey[Seq[File]]("Creates .run.central.synchro.sh file.")
lazy val supler: Project = Project(
"supler",
@@ -73,10 +73,11 @@ object SuplerBuild extends Build {
libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-compiler" % _),
libraryDependencies ++= Seq(json4sNative, scalaTest),
makeVersionSh := {
val pf = new java.io.File(".project.version.sh")
val pf = new java.io.File(".run.central.synchro.sh")
val content = s"""
|#!/bin/bash
|export PROJECT_VERSION=${version.value}
|sh .central.synchro.sh
""".stripMargin
IO.write(pf, content)
Seq(pf)

0 comments on commit e7b021a

Please sign in to comment.