Skip to content

Commit 2f92015

Browse files
authored
Fix docs builds when not in Git tree (#54445)
The documentation builds can fail if the Julia source code is not properly in a Git repo (tarballs, Buildkite). This should ensure that Documenter knows which remote repository corresponds to the Julia source tree. Hopefully will fix JuliaCI/julia-buildkite#336
1 parent 20c3628 commit 2f92015

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/make.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,14 @@ documenter_stdlib_remotes = let stdlib_dir = realpath(joinpath(@__DIR__, "..", "
103103
isdir(package_root_dir) || mkpath(package_root_dir)
104104
package_root_dir => (remote, package_sha)
105105
end
106-
Dict(remotes_list)
106+
Dict(
107+
# We also add the root of the repository to `remotes`, because we do not always build the docs in a
108+
# checked out JuliaLang/julia repository. In particular, when building Julia from tarballs, there is no
109+
# Git information available. And also the way the BuildKite CI is configured to check out the code means
110+
# that in some circumstances the Git repository information is incorrect / no available via Git.
111+
dirname(@__DIR__) => (Documenter.Remotes.GitHub("JuliaLang", "julia"), Base.GIT_VERSION_INFO.commit),
112+
remotes_list...
113+
)
107114
end
108115

109116
# Check if we are building a PDF

0 commit comments

Comments
 (0)