Skip to content

Commit

Permalink
Merge pull request #1874 from JuliaDocs/mp/0.27.21
Browse files Browse the repository at this point in the history
Backports for 0.27.21
  • Loading branch information
mortenpi authored Jul 13, 2022
2 parents 7a77b21 + a428f80 commit 186172b
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 82 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,54 @@ jobs:
with:
name: PDF build logs
path: ${{ github.workspace }}/latex-debug-logs

linkcheck:
name: "Linkcheck: online tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Run online linkcheck tests
run: julia --color=yes test/run_docchecks.jl

linkcheck-manual:
name: "Linkcheck: Documenter manual"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Install dependencies
run: julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and check documentation
run: julia --color=yes --project=docs/ docs/make.jl linkcheck

changelog:
name: "Verify CHANGELOG"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
- name: Install dependencies
run: julia --color=yes --project=scripts/ -e 'using Pkg; Pkg.instantiate()'
- name: Test scripts/changelog.jl
run: |
# Run the unit tests of the changelog.jl script:
julia --color=yes --code-coverage --project=scripts/ scripts/changelog.jl test
# Run changelog.jl with a small, but known good CHANGELOG file and make sure it passes:
julia --color=yes --code-coverage --project=scripts/ scripts/changelog.jl --file=scripts/changelog-valid.md
# Run changelog.jl with a known _bad_ CHANGELOG file, which should exit with a non-zero code:
! julia --color=yes --code-coverage --project=scripts/ scripts/changelog.jl --file=scripts/changelog-invalid.md
- name: Check CHANGELOG.md
run: julia --color=yes --code-coverage --project=scripts/ scripts/changelog.jl --github
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,scripts
- uses: codecov/codecov-action@v1
with:
file: lcov.info
31 changes: 0 additions & 31 deletions .github/workflows/linkcheck.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/repochecks.yml

This file was deleted.

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.21`

* ![Bugfix][badge-bugfix] Fix a regression where Documenter throws an error on systems that do not have Git available. ([#1870][github-1870], [#1871][github-1871])

## Version `v0.27.20`

* ![Enhancement][badge-enhancement] The various JS and font dependencies of the HTML backend have been updated to the latest non-breaking versions. ([#1844][github-1844], [#1846][github-1846])
Expand Down Expand Up @@ -1074,6 +1078,8 @@
[github-1861]: https://github.com/JuliaDocs/Documenter.jl/pull/1861
[github-1862]: https://github.com/JuliaDocs/Documenter.jl/pull/1862
[github-1865]: https://github.com/JuliaDocs/Documenter.jl/pull/1865
[github-1870]: https://github.com/JuliaDocs/Documenter.jl/issues/1870
[github-1871]: https://github.com/JuliaDocs/Documenter.jl/pull/1871
<!-- end of issue link definitions -->

[julia-38079]: https://github.com/JuliaLang/julia/issues/38079
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Documenter"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.27.20"
version = "0.27.21"

[deps]
ANSIColoredPrinters = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
Expand Down
Binary file modified docs/src/assets/favicon.ico
Binary file not shown.
17 changes: 14 additions & 3 deletions src/Utilities/Utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,19 @@ it out automatically.
to construct the warning messages.
"""
function git_remote_head_branch(varname, root; remotename = "origin", fallback = "master")
gitcmd = git(nothrow = true)
if gitcmd === nothing
@warn """
Unable to determine $(varname) from remote HEAD branch, defaulting to "$(fallback)".
Unable to find the `git` binary. Unless this is due to a configuration error, the
relevant variable should be set explicitly.
"""
return fallback
end
# We need to do addenv() here to merge the new variables with the environment set by
# Git_jll and the git() function.
cmd = addenv(
setenv(`$(git()) remote show $(remotename)`, dir=root),
setenv(`$gitcmd remote show $(remotename)`, dir=root),
"GIT_TERMINAL_PROMPT" => "0",
"GIT_SSH_COMMAND" => get(ENV, "GIT_SSH_COMMAND", "ssh -o \"BatchMode yes\""),
)
Expand Down Expand Up @@ -843,9 +852,11 @@ function is_draft(doc, page)::Bool
return get(page.globals.meta, :Draft, get(page.globals.meta, :draft, is_draft(doc)))
end

function git(; kwargs...)
function git(; nothrow = false, kwargs...)
system_git_path = Sys.which("git")
(system_git_path === nothing) && error("Unable to find `git`")
if system_git_path === nothing
return nothrow ? nothing : error("Unable to find `git`")
end
# According to the Git man page, the default GIT_TEMPLATE_DIR is at /usr/share/git-core/templates
# We need to set this to something so that Git wouldn't pick up the user
# templates (e.g. from init.templateDir config).
Expand Down
1 change: 0 additions & 1 deletion test/deploydocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Documenter.authenticated_repo_url(c::TestDeployConfig) = c.repo_path
@test islink(joinpath("worktree", "v1.1"))
@test islink(joinpath("worktree", "stable"))
end
Sys.which("tree") === nothing || run(`tree`)
# And make sure that archived option didn't modify gh-pages
@test ! ispath(joinpath("worktree", "2.0.0"))
@test ! ispath(joinpath("worktree", "v2.0"))
Expand Down
32 changes: 21 additions & 11 deletions test/errors/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,24 @@ end
strict=false,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
) === nothing
# The two following tests should start failing once the underlying bug in Base.Docs is fixed,
# at which point these tests should be removed (or replaced with ones testing against some
# manually crafted Docs.meta).
@test_throws ErrorException makedocs(
strict = true,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
)
@test_throws ErrorException makedocs(
strict = :autodocs_block,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
)
if VERSION >= v"1.9.0-DEV.954"
# The docsystem metadata for the following tests was fixed in
# https://github.com/JuliaLang/julia/pull/45529
@test makedocs(
strict = true,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
) === nothing
@test makedocs(
strict = :autodocs_block,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
) === nothing
else
@test_throws ErrorException makedocs(
strict = true,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
)
@test_throws ErrorException makedocs(
strict = :autodocs_block,
source = "src.docmeta", modules = [BadDocmetaModule], sitename="-", checkdocs = :exports,
)
end

2 comments on commit 186172b

@mortenpi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

A bugfix release. The changes are documented in the CHANGELOG.md file.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/64151

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.27.21 -m "<description of version>" 186172b6d33aed2cf0d79724d140d592d0da291f
git push origin v0.27.21

Please sign in to comment.