Skip to content

Commit 44cdb79

Browse files
mortenpifingolfin
authored andcommitted
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 b67c572 commit 44cdb79

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
@@ -102,7 +102,14 @@ documenter_stdlib_remotes = let stdlib_dir = realpath(joinpath(@__DIR__, "..", "
102102
isdir(package_root_dir) || mkpath(package_root_dir)
103103
package_root_dir => (remote, package_sha)
104104
end
105-
Dict(remotes_list)
105+
Dict(
106+
# We also add the root of the repository to `remotes`, because we do not always build the docs in a
107+
# checked out JuliaLang/julia repository. In particular, when building Julia from tarballs, there is no
108+
# Git information available. And also the way the BuildKite CI is configured to check out the code means
109+
# that in some circumstances the Git repository information is incorrect / no available via Git.
110+
dirname(@__DIR__) => (Documenter.Remotes.GitHub("JuliaLang", "julia"), Base.GIT_VERSION_INFO.commit),
111+
remotes_list...
112+
)
106113
end
107114

108115
# Check if we are building a PDF

0 commit comments

Comments
 (0)