From c75e6ee00f08d4cda4fb2e6bc19f531711ef34f0 Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Fri, 9 Aug 2024 12:51:47 +1200 Subject: [PATCH] fix: also unset `repo` in the packages `make.jl` (#222) --- Project.toml | 2 +- src/utils/rewrite.jl | 8 ++++++++ test/runtests.jl | 31 ++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index ab2ba649..ce77a897 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "DocumentationGenerator" uuid = "8f0d3306-d70b-5309-b898-24bb6ab47850" authors = ["Sebastian Pfitzner ", "Simon Danisch ", "Venkatesh Dayananda "] repo = "https://github.com/JuliaDocs/DocumentationGenerator.jl.git" -version = "0.7.7" +version = "0.7.8" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/src/utils/rewrite.jl b/src/utils/rewrite.jl index e5563fc2..628f6cd7 100644 --- a/src/utils/rewrite.jl +++ b/src/utils/rewrite.jl @@ -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 @@ -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 @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 0b1b715b..5f01d291 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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__