-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.jl
47 lines (38 loc) · 2.36 KB
/
main.jl
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
include("utils.jl")
args = parse_commandline()
output_folder = abspath(args["output-folder"])
docs_site_root = args["docs-site-root"]
@show docs_site_root
return
package_info = Dict(
"Genie" => (url = "https://github.com/GenieFramework/Genie.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API")),
"Stipple" => (url = "https://github.com/GenieFramework/Stipple.jl.git", docs_folder = joinpath(docs_site_root, "3.stipple.jl", "3.API")),
"StippleUI" => (url = "https://github.com/GenieFramework/StippleUI.jl.git", docs_folder = joinpath(docs_site_root, "3.stipple.jl", "3.API", "components")),
"Searchlight" => (url = "https://github.com/GenieFramework/SearchLight.jl.git", docs_folder = joinpath(docs_site_root, "4.searchlight.jl", "3.API")),
"GenieCache" => (url = "https://github.com/GenieFramework/GenieCache.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API", "GenieCache")),
"GenieDeploy" => (url = "https://github.com/GenieFramework/GenieDeploy.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API", "GenieDeploy")),
"GenieSession" => (url = "https://github.com/GenieFramework/GenieSession.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API", "GenieSession")),
"GenieAuthentication" => (url = "https://github.com/GenieFramework/GenieAuthentication.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API", "GenieAuthentication")),
"GenieAuthorisation" => (url = "https://github.com/GenieFramework/GenieAuthorisation.jl.git", docs_folder = joinpath(docs_site_root, "2.genie.jl", "3.API", "GenieAuthorisation"))
)
packages = args["packages"] != [] ? args["packages"] : keys(package_info)
mkpath(output_folder)
mkpath("packages")
root_folder = pwd()
for package in packages
println("Checking repository $package")
repo_version = split(package, '-')
if length(repo_version) > 1
package, version = repo_version
clone_or_update_repo(package_info[package].url, package, version)
else
clone_or_update_repo(package_info[package].url, package)
end
if docs_site_root != ""
doc_output = joinpath(output_folder, package_info[package].docs_folder)
else
doc_output = joinpath(output_folder, package)
end
process_folder(joinpath("packages", package, "docs"), doc_output)
end
println("Documentation generation complete.")