Skip to content

Commit

Permalink
Build: Point source maps online only when running from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
raquo committed Dec 5, 2023
1 parent 08d17d3 commit 74aabc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [publish]
tags: ["*"]

env:
CI: true

jobs:
publish:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ '**' ]

env:
CI: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ lazy val jsSettings = Seq(
"com.raquo" %%% "airstream" % Versions.Airstream,
"com.raquo" %%% "laminar" % Versions.Laminar % Test
),
scalacOptions += {
scalacOptions ++= sys.env.get("CI").map { _ =>
val localSourcesPath = baseDirectory.value.toURI
val remoteSourcesPath = s"https://raw.githubusercontent.com/raquo/Waypoint/${git.gitHeadCommit.value.get}/"
val sourcesOptionName = if (scalaVersion.value.startsWith("2.")) "-P:scalajs:mapSourceURI" else "-scalajs-mapSourceURI"
Expand Down

0 comments on commit 74aabc2

Please sign in to comment.