Skip to content

Commit

Permalink
Fix docs builds when not in Git tree (#54445)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mortenpi authored May 13, 2024
1 parent 20c3628 commit 2f92015
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ documenter_stdlib_remotes = let stdlib_dir = realpath(joinpath(@__DIR__, "..", "
isdir(package_root_dir) || mkpath(package_root_dir)
package_root_dir => (remote, package_sha)
end
Dict(remotes_list)
Dict(
# We also add the root of the repository to `remotes`, because we do not always build the docs in a
# checked out JuliaLang/julia repository. In particular, when building Julia from tarballs, there is no
# Git information available. And also the way the BuildKite CI is configured to check out the code means
# that in some circumstances the Git repository information is incorrect / no available via Git.
dirname(@__DIR__) => (Documenter.Remotes.GitHub("JuliaLang", "julia"), Base.GIT_VERSION_INFO.commit),
remotes_list...
)
end

# Check if we are building a PDF
Expand Down

0 comments on commit 2f92015

Please sign in to comment.