Skip to content

Commit

Permalink
Compile all in same build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsieurV committed Jun 28, 2024
1 parent 8425357 commit 90c0021
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 2024-06-28-2

* Run all commands in same directory to simplify path resolution for `filecontents` and uploaded resources

## 2024-06-28-1

* Set `cwd` for latexrun.py so the `filecontents` directives can work as expected #42
Expand Down
1 change: 1 addition & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- .:/app/latex-on-http
environment:
CACHE_HOST: cache
KEEP_WORKSPACE_DIR_ON_ERROR: 1
cache:
build:
context: .
Expand Down
4 changes: 3 additions & 1 deletion latexonhttp/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def latexToPdf(compilerName, directory, main_resource, options={}):
# TODO Uses workspace.filesystem module to these get paths.
input_path = "{}/{}".format(directory, main_resource["build_path"])
output_path = "{}/output.pdf".format(directory)
log_dir = "{}/latex.out".format(directory)
# Use the same root directory to prevent issues
# with filecontents and uploaded resources (path resolution).
log_dir = "{}".format(directory)
logger.info("Compiling %s from %s", main_resource["build_path"], directory)
# Use https://github.com/aclements/latexrun
# to manage multiple runs of Latex compiler for us.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_up_and_running.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_api_index(latex_on_http_api_url):
"message": "Welcome to the LaTeX-On-HTTP API",
"source": "https://github.com/YtoTech/latex-on-http",
"documentation": "https://github.com/YtoTech/latex-on-http",
"texlive_version": "2023",
"texlive_version": "2024",
"version": get_api_version(),
}

Expand Down

0 comments on commit 90c0021

Please sign in to comment.