Skip to content

Commit 456b738

Browse files
authored
Remove verbose build. (#2)
1 parent 80fd258 commit 456b738

File tree

1 file changed

+40
-27
lines changed

1 file changed

+40
-27
lines changed

pdf/make.jl

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,34 @@ function download_nightly()
3636
return julia_exec, commit
3737
end
3838

39+
function makedocs(julia_exec)
40+
@sync begin
41+
builder = @async begin
42+
withenv("TRAVIS_REPO_SLUG" => nothing, # workaround Documenter bugs and julia#26314
43+
"BUILDROOT" => nothing) do
44+
run(`make -C $(JULIA_SOURCE)/doc pdf texplatform=docker JULIA_EXECUTABLE=$(julia_exec)`)
45+
end
46+
end
47+
@async begin
48+
while !istaskdone(builder)
49+
sleep(60)
50+
@info "building pdf ..."
51+
end
52+
end
53+
end
54+
end
55+
56+
function copydocs(path)
57+
output = "$(JULIA_SOURCE)/doc/_build/pdf/en"
58+
for f in readdir(output)
59+
if startswith(f, "TheJuliaLanguage") && endswith(f, ".pdf")
60+
cp("$(output)/$(f)", path; force=true)
61+
@info "finished, output file copied to $(path)."
62+
break
63+
end
64+
end
65+
end
66+
3967
function build_release_pdf(v::VersionNumber)
4068
x, y, z = v.major, v.minor, v.patch
4169
@info "building PDF for Julia v$(x).$(y).$(z)."
@@ -53,24 +81,15 @@ function build_release_pdf(v::VersionNumber)
5381
@info "downloading release tarball."
5482
julia_exec = download_release(v)
5583

56-
# checkout relevant tag and build the PDF
84+
# checkout relevant tag and clean repo
5785
run(`git -C $(JULIA_SOURCE) checkout v$(x).$(y).$(z)`)
5886
run(`git -C $(JULIA_SOURCE) clean -fdx`)
59-
withenv("DOCUMENTER_VERBOSE" => "true",
60-
"TRAVIS_REPO_SLUG" => nothing, # workaround Documenter bugs and julia#26314
61-
"BUILDROOT" => nothing) do
62-
run(`make -C $(JULIA_SOURCE)/doc pdf texplatform=docker JULIA_EXECUTABLE=$(julia_exec)`)
63-
end
87+
88+
# invoke makedocs
89+
makedocs(julia_exec)
6490

6591
# copy built PDF to JULIA_DOCS
66-
output = "$(JULIA_SOURCE)/doc/_build/pdf/en"
67-
for f in readdir(output)
68-
if startswith(f, "TheJuliaLanguage") && endswith(f, ".pdf")
69-
cp("$(output)/$(f)", path)
70-
@info "finished, output file copied to $(path)."
71-
break
72-
end
73-
end
92+
copydocs(path)
7493
end
7594

7695
function build_nightly_pdf()
@@ -79,25 +98,19 @@ function build_nightly_pdf()
7998
# output is "julia version 1.1.0-DEV"
8099
_, _, v = split(readchomp(`$(julia_exec) --version`))
81100
@info "commit determined to $(commit) and version determined to $(v)."
101+
82102
file = "julia-$(v).pdf"
83103
path = "$JULIA_DOCS/$file"
104+
105+
# checkout correct commit and clean repo
84106
run(`git -C $(JULIA_SOURCE) checkout $(commit)`)
85107
run(`git -C $(JULIA_SOURCE) clean -fdx`)
86-
withenv("DOCUMENTER_VERBOSE" => "true",
87-
"TRAVIS_REPO_SLUG" => nothing, # workaround Documenter bugs and julia#26314
88-
"BUILDROOT" => nothing) do
89-
run(`make -C $(JULIA_SOURCE)/doc pdf texplatform=docker JULIA_EXECUTABLE=$(julia_exec)`)
90-
end
108+
109+
# invoke makedocs
110+
makedocs(julia_exec)
91111

92112
# copy the built PDF to JULIA_DOCS
93-
output = "$(JULIA_SOURCE)/doc/_build/pdf/en"
94-
for f in readdir(output)
95-
if startswith(f, "TheJuliaLanguage") && endswith(f, ".pdf")
96-
cp("$(output)/$(f)", path)
97-
@info "finished, output file copied to $(path)."
98-
break
99-
end
100-
end
113+
copydocs(path)
101114
end
102115

103116
# find all tags in the julia repo

0 commit comments

Comments
 (0)