Skip to content

Commit d85f04b

Browse files
authored
Fix existing -source-links setting syntax
1 parent d7a4cf5 commit d85f04b

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

github-actions/src/main/scala/com/thoughtworks/sbtBestPractice/githubActions/GithubActionsScaladocSourceUrl.scala

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,6 @@ object GithubActionsScaladocSourceUrl extends AutoPlugin {
3333
originalScalacOptions
3434
}
3535
},
36-
Compile / doc / scalacOptions ++= {
37-
if (scalaBinaryVersion.value == "3") {
38-
for {
39-
repositoryBuilder <- GitPlugin.gitRepositoryBuilder.?.value
40-
workTree <- GitPlugin.gitWorkTree.value
41-
slug <- GithubActionsEnvironmentVariables.githubRepository.?.value
42-
} yield {
43-
val repository = repositoryBuilder.build()
44-
try {
45-
val hash = repository.resolve(Constants.HEAD).name
46-
raw"-source-links:$workTree=github://$slug/$hash"
47-
} finally {
48-
repository.close()
49-
}
50-
}
51-
} else {
52-
None
53-
}
54-
},
5536
scalacOptions in Compile in doc := {
5637
val originalScalacOptions = (scalacOptions in Compile in doc).value
5738
(GitPlugin.gitRepositoryBuilder.?.value, GithubActionsEnvironmentVariables.githubRepository.?.value) match {
@@ -69,7 +50,7 @@ object GithubActionsScaladocSourceUrl extends AutoPlugin {
6950
}
7051
} else {
7152
val pathPrefix = GitPlugin.gitWorkTree.value.fold("")(_.toString())
72-
originalScalacOptions :+ raw"-source-links:$pathPrefix:github://$slug/$hash"
53+
originalScalacOptions :+ raw"-source-links:$pathPrefix=github://$slug/$hash"
7354
}
7455
} finally {
7556
repository.close()

0 commit comments

Comments
 (0)