Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for empty entries in generate_version_file #1596

Merged
merged 2 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Documenter.jl changelog

## Version `v0.27.1`

* ![Bugfix][badge-bugfix] Documenter no longer throws an error when generating the version selector if there are no deployed versions. ([#1594][github-1594], [#1596][github-1596])

## Version `v0.27.0`

* ![Enhancement][badge-enhancement] The JS dependencies have been updated to their respective latest versions.
Expand Down Expand Up @@ -808,6 +812,8 @@
[github-1567]: https://github.com/JuliaDocs/Documenter.jl/pull/1567
[github-1577]: https://github.com/JuliaDocs/Documenter.jl/pull/1577
[github-1590]: https://github.com/JuliaDocs/Documenter.jl/pull/1590
[github-1594]: https://github.com/JuliaDocs/Documenter.jl/issues/1594
[github-1596]: https://github.com/JuliaDocs/Documenter.jl/pull/1596

[julia-38079]: https://github.com/JuliaLang/julia/issues/38079
[julia-39841]: https://github.com/JuliaLang/julia/pull/39841
Expand Down
3 changes: 3 additions & 0 deletions src/Writers/HTMLWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,9 @@ function generate_version_file(versionfile::AbstractString, entries, symlinks =
end
println(buf, "];")

# entries is empty if no versions have been built at all
isempty(entries) && return

# The first element in entries corresponds to the latest version, but is usually not the full version
# number. So this essentially follows the symlinks that will be generated to figure out the full
# version number (stored in DOCUMENTER_CURRENT_VERSION in siteinfo.js).
Expand Down