Skip to content

Commit

Permalink
Allow passing ARGS via env.vars to docs/make.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed Jul 3, 2019
1 parent 4063537 commit 02619fd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
using Documenter, DocumenterTools

# The DOCSARGS environment variable can be used to pass additional arguments to make.jl.
# This is useful on CI, if you need to change the behavior of the build slightly but you
# can not change the .travis.yml or make.jl scripts any more (e.g. for a tag build).
if haskey(ENV, "DOCSARGS")
for arg in split(ENV["DOCSARGS"])
push!(ARGS, arg)
end
end

makedocs(
modules = [Documenter, DocumenterTools],
format = Documenter.HTML(
Expand Down Expand Up @@ -51,8 +60,8 @@ makedocs(
],
"contributing.md",
],
strict = true,
doctest = ("doctest-only" in ARGS) ? :only : true,
strict = !("strict=false" in ARGS),
doctest = ("doctest=only" in ARGS) ? :only : true,
)

deploydocs(
Expand Down

0 comments on commit 02619fd

Please sign in to comment.