-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathmake.jl
More file actions
52 lines (46 loc) · 1.7 KB
/
make.jl
File metadata and controls
52 lines (46 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using Documenter, Unitful, Dates
const ci = get(ENV, "CI", nothing) == "true"
function check_defaultunits_version()
vfile = "docs/src/assets/vfile.txt"
r = readline(vfile)
docs_v = VersionNumber(r)
pkg_v = pkgversion(Unitful)
docs_v == pkg_v || error("Docs chapter on default units built with the wrong version of Unitful \
(docs built for $docs_v vs current Unitful version $pkg_v). \
Please run the script on the local computer with the proper Unitful version")
return nothing
end
# on local computer, (re-)create the documentation file defaultunits.md
if !ci
ENV["UNITFUL_FANCY_EXPONENTS"] = false
include("make_def-units_docs.jl")
MakeDefUnitsDocs.make_chapter()
end
DocMeta.setdocmeta!(Unitful, :DocTestSetup, :(using Unitful))
makedocs(
sitename = "Unitful.jl",
format = Documenter.HTML(prettyurls = ci),
warnonly = [:missing_docs],
modules = [Unitful],
workdir = joinpath(@__DIR__, ".."),
pages = [
"Home" => "index.md"
"Highlighted features" => "highlights.md"
"Types" => "types.md"
"Defining new units" => "newunits.md"
"Conversion/promotion" => "conversion.md"
"Manipulating units" => "manipulations.md"
"How units are displayed" => "display.md"
"Logarithmic scales" => "logarithm.md"
"Temperature scales" => "temperature.md"
"Interoperability with `Dates`" => "dates.md"
"Extending Unitful" => "extending.md"
"Troubleshooting" => "trouble.md"
"Pre-defined units and constants" => "defaultunits.md"
"License" => "LICENSE.md"
]
)
if ci
check_defaultunits_version()
deploydocs(repo = "github.com/PainterQubits/Unitful.jl.git")
end