Skip to content

Commit

Permalink
chore: Move src files into their own dir
Browse files Browse the repository at this point in the history
Also update Makefile to compile correctly as well as GH action to
reference the new path.
  • Loading branch information
jonathan-d-zhang committed Dec 29, 2023
1 parent 8f513ad commit e46f23a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and release
on:
push:
paths:
- '*.tex'
- 'src/*.tex'
- '.github/workflows/release.yaml'

env:
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install dependencies
run: python -m pip install -r requirements.txt

- name: Create pdf
- name: Create PNG
run: python -m pdf2png main.pdf main.png

- name: Upload PNG
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
name: "pngs"

- name: Rename main.pdf to my name and current date
run: mv main.pdf "$my_name-$(date +'%Y-%m-%d' --utc).pdf"
run: mv build/main.pdf "$my_name-$(date +'%Y-%m-%d' --utc).pdf"

- name: Release
run: |
Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
BUILD_DIR := ./build
BUILD_CMD := lualatex -halt-on-error -file-line-error -interaction=nonstopmode -output-directory=$(BUILD_DIR)
SRC_DIR := ./src
PDFS := anon.pdf main.pdf

.PHONY: all
all: $(PDFS)

$(PDFS): %.pdf: main.tex
$(PDFS): %.pdf: $(SRC_DIR)/main.tex
mkdir -p $(BUILD_DIR)
$(BUILD_CMD) $(basename $@ .tex)
cp $(BUILD_DIR)/$@ ./
lualatex -halt-on-error -file-line-error -interaction=nonstopmode -output-directory=$(BUILD_DIR) $(SRC_DIR)/$(basename $@ .tex)

.PHONY: clean
clean:
rm -rf build
rm *.pdf
rm -rf $(BUILD_DIR)
2 changes: 0 additions & 2 deletions anon.tex

This file was deleted.

2 changes: 2 additions & 0 deletions src/anon.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\def\isanonymous{1}
\input{src/main.tex}
File renamed without changes.

0 comments on commit e46f23a

Please sign in to comment.