-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
#!/usr/bin/env just --justfile | ||
|
||
# ===== Base variables ===== | ||
PROJECT_NAME := "resume" | ||
DC := "docker-compose" | ||
DC_FILE := "docker-compose.yml" | ||
DC_COMMAND := "docker-compose -p resume -f docker/docker-compose.yml" | ||
|
||
|
||
# ===== Base ===== | ||
help: | ||
@echo "Available commands:" | ||
@echo " run - Run the latex Docker container to build the resume" | ||
@echo " run_linter - Run the chktex linter Docker container" | ||
@echo " run_format - Run the latex Docker container for formatting" | ||
@echo " up - Build the resume builder Docker container" | ||
@echo " down - Down the resume builder Docker container" | ||
@echo " rebuild - Rebuild all Docker containers" | ||
@echo " help - Show this help message" | ||
|
||
|
||
# ===== Docker automation ===== | ||
run: | ||
@echo "[j] Run the latex Docker container ..." | ||
{{DC}} run -d --rm latex bash -c "pdflatex -output-directory=/output resume.tex" | ||
@{{DC_COMMAND}} run -d --rm latex bash -c "pdflatex -output-directory=/output resume.tex" | ||
@echo "[j] Done!" | ||
|
||
run_linter: | ||
@echo "[j] Run the chktex(linter) Docker container ..." | ||
-{{DC}} run -d --rm chktex | ||
@{{DC_COMMAND}} run -d --rm chktex | ||
@echo "[j] Done! Check /output/chktex_output.log for details." | ||
|
||
run_format: | ||
@echo "[j] Run the latex Docker container with formatting ..." | ||
{{DC}} run -d --rm latex | ||
@{{DC_COMMAND}} run -d --rm latex | ||
@echo "[j] Done!" | ||
|
||
up: | ||
@echo "[j] Run the url api Docker container ..." | ||
{{DC}} -p {{PROJECT_NAME}} -f {{DC_FILE}} up -d --build | ||
@echo "[j] Build the resume builder Docker container ..." | ||
{{DC_COMMAND}} up -d --build | ||
@echo "[j] Success up!" | ||
|
||
down: | ||
@echo "[j] Stop the url api Docker container ..." | ||
{{DC}} -p {{PROJECT_NAME}} -f {{DC_FILE}} down | ||
@echo "[j] Down the resume builder Docker container ..." | ||
{{DC_COMMAND}} down | ||
@echo "[j] Success down!" | ||
|
||
rebuild: | ||
@echo "[m] Rebuild all Docker containers ..." | ||
{{DC}} -p {{PROJECT_NAME}} -f {{DC_FILE}} up -d --build --force-recreate | ||
{{DC_COMMAND}} up -d --build --force-recreate | ||
@echo "[m] Rebuild complete!" |