Skip to content

Commit

Permalink
Fix download links in docs (#3205)
Browse files Browse the repository at this point in the history
Not sure when it ended up broken, but the github URL format doesn't
match the URLs generated (missing a `/download/` segment), and
`millVersion` is incorrectly providing the unstable path even for
commits for which no unstable release was published
  • Loading branch information
lihaoyi committed Jun 13, 2024
1 parent f69e39f commit 56323c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ object example extends MillScalaModule {
val title =
if (seenCode) ""
else {
val label = millVersion()
val label = millLastTag()
val exampleDashed = examplePath.segments.mkString("-")
val download = s"{mill-download-url}/$label-$exampleDashed.zip[download]"
val browse = s"{mill-example-url}/$examplePath[browse]"
Expand Down Expand Up @@ -1715,7 +1715,7 @@ object docs extends Module {
| mill-github-url: ${Settings.projectUrl}
| mill-doc-url: ${if (authorMode) s"file://${T.dest}/site" else Settings.docUrl}
| mill-download-url: ${if (authorMode) s"file://${exampleZips().head.path / os.up}"
else s"${Settings.projectUrl}/releases/latest"}
else s"${Settings.projectUrl}/releases/download/latest"}
| mill-example-url: ${if (authorMode) s"file://${T.workspace}"
else s"${Settings.projectUrl}/blob/main/"}
| utest-github-url: https://github.com/com-lihaoyi/utest
Expand Down

0 comments on commit 56323c8

Please sign in to comment.