Skip to content

Commit 4e4df52

Browse files
committed
Actually apply patches when testing in CI
1 parent d180f4e commit 4e4df52

3 files changed

Lines changed: 39 additions & 32 deletions

File tree

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ vaults: vault-dnd51 vault-dnd521
1616
assets: vault-dnd51-zip vault-dnd521-zip
1717

1818
vault-dnd51:
19-
./patches.sh dnd/51/markdown apply
20-
python update_vault.py dnd/51/markdown dnd/51/obsidian_vault
21-
./update_vault_indexes.sh dnd/51
22-
./patches.sh dnd/51/obsidian_vault apply
19+
@./patches.sh dnd/51/markdown apply
20+
@python update_vault.py dnd/51/markdown dnd/51/obsidian_vault
21+
@./update_vault_indexes.sh dnd/51
22+
@./patches.sh dnd/51/obsidian_vault apply
2323

2424
vault-dnd51-zip: vault-dnd51
2525
rsync -av dnd/51/obsidian_vault/ /tmp/dnd_51_srd/
2626
(cd /tmp && zip -r dnd_51_srd.zip dnd_51_srd/)
2727

2828
vault-dnd521:
29-
./patches.sh dnd/521/markdown apply
30-
python update_vault.py dnd/521/markdown dnd/521/obsidian_vault
31-
./update_vault_indexes.sh dnd/521
32-
./patches.sh dnd/521/obsidian_vault apply
29+
@./patches.sh dnd/521/markdown apply
30+
@python update_vault.py dnd/521/markdown dnd/521/obsidian_vault
31+
@./update_vault_indexes.sh dnd/521
32+
@./patches.sh dnd/521/obsidian_vault apply
3333

3434
vault-dnd521-zip: vault-dnd521
3535
rsync -av dnd/521/obsidian_vault/ /tmp/dnd_521_srd/

dnd/51/markdown_patches/Conditions/Conditions.patch

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55

66
The following definitions specify what happens to a creature while it is subjected to a condition.
77
+
8-
+- [[Blinded]]
9-
+- [[Charmed]]
10-
+- [[Deafened]]
11-
+- [[Exhaustion]]
12-
+- [[Frightened]]
13-
+- [[Grappled]]
14-
+- [[Incapacitated]]
15-
+- [[Invisible]]
16-
+- [[Paralyzed]]
17-
+- [[Petrified]]
18-
+- [[Poisoned]]
19-
+- [[Prone]]
20-
+- [[Restrained]]
21-
+- [[Stunned]]
22-
+- [[Unconscious]]
8+
+- Blinded
9+
+- Charmed
10+
+- Deafened
11+
+- Exhaustion
12+
+- Frightened
13+
+- Grappled
14+
+- Incapacitated
15+
+- Invisible
16+
+- Paralyzed
17+
+- Petrified
18+
+- Poisoned
19+
+- Prone
20+
+- Restrained
21+
+- Stunned
22+
+- Unconscious

tests/ci/ci.bats

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
@test "check for 5.1 vault changes" {
2020
expected_output=$(sed -e 's/^ //' <<' EOF'
21+
== Conditions/Conditions.md
2122
About the vault.md: no longer in source directory
2223
Magic Items/List of Magic Items by A-Z.md: no longer in source directory
2324
Magic Items/List of Magic Items by Rarity.md: no longer in source directory
@@ -29,9 +30,7 @@
2930
EOF
3031
)
3132
32-
run python update_vault.py \
33-
dnd/51/markdown \
34-
dnd/51/obsidian_vault
33+
run make vault-dnd51
3534
diff -u <(echo "$expected_output") <(echo "$output")
3635
[ "$status" -eq 0 ]
3736
@@ -67,9 +66,8 @@
6766
EOF
6867
)
6968
70-
run python update_vault.py \
71-
dnd/521/markdown \
72-
dnd/521/obsidian_vault
69+
70+
run make vault-dnd521
7371
diff -u <(echo "$expected_output") <(echo "$output")
7472
[ "$status" -eq 0 ]
7573
@@ -78,7 +76,16 @@
7876
}
7977
8078
@test "zero files changed" {
81-
run git status --porcelain
82-
diff -u <(echo "") <(echo "$output")
83-
[ "$status" -eq 0 ]
79+
status_output=$(git status --porcelain)
80+
diff_output=$(git diff)
81+
82+
combined_output="$status_output"
83+
if [ -n "$status_output" ]; then
84+
combined_output="$status_output
85+
86+
Diff:
87+
$diff_output"
88+
fi
89+
90+
diff -u <(echo "") <(echo "$combined_output")
8491
}

0 commit comments

Comments
 (0)