diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44150c0..03519e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: push: branches: [publish] tags: ["*"] +env: + CI: true jobs: publish: runs-on: ubuntu-20.04 @@ -16,4 +18,4 @@ jobs: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} \ No newline at end of file + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index e2d8d49..eff5550 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -4,6 +4,9 @@ on: push: branches: [ '**' ] +env: + CI: true + jobs: build: diff --git a/build.sbt b/build.sbt index 650010d..abbd349 100644 --- a/build.sbt +++ b/build.sbt @@ -43,8 +43,20 @@ lazy val `url-dsl` = crossProject(JSPlatform, JVMPlatform) "org.scalatest" %%% "scalatest" % "3.2.14" % Test, "org.scalacheck" %%% "scalacheck" % "1.17.0" % Test, "org.scalameta" %%% "munit" % "0.7.29" % Test + ), + (Compile / doc / scalacOptions) ++= Seq( + "-no-link-warnings" // Suppress scaladoc "Could not find any member to link for" warnings ) ) + .jsSettings( + scalacOptions ++= sys.env.get("CI").map { _ => + val localSourcesPath = (LocalRootProject / baseDirectory).value.toURI + val remoteSourcesPath = s"https://raw.githubusercontent.com/sherpal/url-dsl/${git.gitHeadCommit.value.get}/" + val sourcesOptionName = if (scalaVersion.value.startsWith("2.")) "-P:scalajs:mapSourceURI" else "-scalajs-mapSourceURI" + + s"${sourcesOptionName}:$localSourcesPath->$remoteSourcesPath" + } + ) .jvmSettings( coverageFailOnMinimum := true, coverageMinimumStmtTotal := 99,