Skip to content

Commit 8fa0042

Browse files
authored
Point source maps to github (#20)
* Point source maps to github URLs * Disable doc link warnings Needed for +publishLocal to work
1 parent 70cc8c2 commit 8fa0042

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
branches: [publish]
55
tags: ["*"]
6+
env:
7+
CI: true
68
jobs:
79
publish:
810
runs-on: ubuntu-20.04
@@ -16,4 +18,4 @@ jobs:
1618
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
1719
PGP_SECRET: ${{ secrets.PGP_SECRET }}
1820
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
19-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
21+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

.github/workflows/scala.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [ '**' ]
66

7+
env:
8+
CI: true
9+
710
jobs:
811
build:
912

build.sbt

+12
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,20 @@ lazy val `url-dsl` = crossProject(JSPlatform, JVMPlatform)
4343
"org.scalatest" %%% "scalatest" % "3.2.14" % Test,
4444
"org.scalacheck" %%% "scalacheck" % "1.17.0" % Test,
4545
"org.scalameta" %%% "munit" % "0.7.29" % Test
46+
),
47+
(Compile / doc / scalacOptions) ++= Seq(
48+
"-no-link-warnings" // Suppress scaladoc "Could not find any member to link for" warnings
4649
)
4750
)
51+
.jsSettings(
52+
scalacOptions ++= sys.env.get("CI").map { _ =>
53+
val localSourcesPath = (LocalRootProject / baseDirectory).value.toURI
54+
val remoteSourcesPath = s"https://raw.githubusercontent.com/sherpal/url-dsl/${git.gitHeadCommit.value.get}/"
55+
val sourcesOptionName = if (scalaVersion.value.startsWith("2.")) "-P:scalajs:mapSourceURI" else "-scalajs-mapSourceURI"
56+
57+
s"${sourcesOptionName}:$localSourcesPath->$remoteSourcesPath"
58+
}
59+
)
4860
.jvmSettings(
4961
coverageFailOnMinimum := true,
5062
coverageMinimumStmtTotal := 99,

0 commit comments

Comments
 (0)