Skip to content

Commit

Permalink
fix: also unset repo in the packages make.jl (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Aug 9, 2024
1 parent 225eb3f commit c75e6ee
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "DocumentationGenerator"
uuid = "8f0d3306-d70b-5309-b898-24bb6ab47850"
authors = ["Sebastian Pfitzner <[email protected]>", "Simon Danisch <[email protected]>", "Venkatesh Dayananda <[email protected]>"]
repo = "https://github.com/JuliaDocs/DocumentationGenerator.jl.git"
version = "0.7.7"
version = "0.7.8"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
8 changes: 8 additions & 0 deletions src/utils/rewrite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function fix_makefile(makefile, documenter_version = v"0.24")
has_doctest = false
has_root = false
has_remotes = false
has_repo = false
html = documenter_version < v"0.21" ? QuoteNode(:html) : :(Documenter.HTML())

fixkwarg = argument -> begin
Expand Down Expand Up @@ -85,6 +86,10 @@ function fix_makefile(makefile, documenter_version = v"0.24")
has_remotes = true
argument.args[2] = nothing
end
if name == :repo
has_repo = true
argument.args[2] = ""
end
if name == :doctest
has_doctest = true
argument.args[2] = false
Expand Down Expand Up @@ -126,6 +131,9 @@ function fix_makefile(makefile, documenter_version = v"0.24")
if !has_remotes
push!(new_args, Expr(:kw, :remotes, nothing))
end
if !has_repo
push!(new_args, Expr(:kw, :repo, ""))
end

elem = Expr(:call, new_args...)
end
Expand Down
31 changes: 30 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,36 @@ end
success = [true],
doctype = ["documenter"],
using_failed = [false]
)
),
# This Horus.jl version has the `repo` keyword set in make.jl,
# but uses Documenter 1.0+, so we need to unset both `repo` and
# `remotes` for it to build correctly.
let p = (
name = "Horus",
url = "https://github.com/aviks/Horus.jl.git",
uuid = "bc501ac0-6d4c-4855-b16f-b0e03415614f",
versions = [v"0.1.0"],
server_type = "github",
api_url="",
)
# Horus v0.1.0 requires at least Julia 1.9
if VERSION >= v"1.9"
(;
p...,
installs = [true],
success = [true],
doctype = ["documenter"],
using_failed = [false],
)
else
(;
p...,
installs = [false],
success = [false],
doctype = ["missing"],
)
end
end,
]

basepath = @__DIR__
Expand Down

0 comments on commit c75e6ee

Please sign in to comment.