Skip to content

Commit

Permalink
Merge pull request #916 from xuwei-k/scalajs-mapSourceURI-option
Browse files Browse the repository at this point in the history
add -P:scalajs:mapSourceURI option
  • Loading branch information
non committed Mar 7, 2016
2 parents b638e29 + f8b5e29 commit ae7b531
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,19 @@ lazy val commonSettings = Seq(
scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings")
) ++ warnUnusedImport

lazy val tagName = Def.setting{
s"v${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}"
}

lazy val commonJsSettings = Seq(
scalacOptions += {
val tagOrHash =
if(isSnapshot.value) sys.process.Process("git rev-parse HEAD").lines_!.head
else tagName.value
val a = (baseDirectory in LocalRootProject).value.toURI.toString
val g = "https://raw.githubusercontent.com/typelevel/cats/" + tagOrHash
s"-P:scalajs:mapSourceURI:$a->$g/"
},
scalaJSStage in Global := FastOptStage,
parallelExecution := false
)
Expand Down Expand Up @@ -327,6 +339,7 @@ lazy val commonScalacOptions = Seq(

lazy val sharedPublishSettings = Seq(
releaseCrossBuild := true,
releaseTagName := tagName.value,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
Expand Down

0 comments on commit ae7b531

Please sign in to comment.