Skip to content

Commit

Permalink
Remove Tectonic patch (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer authored Nov 9, 2021
1 parent a168b07 commit bcd824c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
13 changes: 1 addition & 12 deletions src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,17 +396,6 @@ function build_all(; project="default", extra_head="", fail_on_error=false)
build_sitemap = true
html(; project, extra_head, fail_on_error, build_sitemap)
write_extra_html_files(project)
try
pdf(; project)
catch e
# Only patch in CI.
if IS_CI
println("PDF generation failed. Patching the archive.org URL and trying again")
patch_tectonic_url()
pdf(; project)
else
throw(e)
end
end
pdf(; project)
docx(; project)
end
18 changes: 0 additions & 18 deletions src/ci.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,3 @@ function write_extra_html_files(project)
write(path, robots)
return nothing
end

"""
patch_tectonic_url()
Workaround for https://github.com/tectonic-typesetting/tectonic/issues/765.
"""
function patch_tectonic_url()
old_url = "https://archive.org/services/purl/net/pkgwpub/tectonic-default"
# The new URL seems to be required to have the same length as the old URL for patching to work.
new_url = "https://tectonicredirectmirrorabc.netlify.app/tectonic-default"

tectonic = joinpath(Artifacts.artifact"Tectonic", "tectonic")
run(`chmod 775 $tectonic`)
arg = "s@$(old_url)@$(new_url)@"
cmd = `sed -i $arg $tectonic`
run(cmd)
return nothing
end

0 comments on commit bcd824c

Please sign in to comment.