fix: small misc issues with build (#118)

Auto formatted all typst code and fixed CI issue due to using upload artifacts v4 (actions/upload-artifact@v4/docs/MIGRATION.md)
This commit is contained in:
Paul T
2025-05-22 14:32:45 -04:00
committed by GitHub
parent 076afdd74e
commit ac7c078341
10 changed files with 192 additions and 348 deletions

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env bash
set -eu
find . -iname "*.typ" | xargs typstyle -i
find . -iname "*.typ" | xargs typstyle -i

View File

@@ -27,40 +27,40 @@ readarray -t ignores < <(grep -v '^#' .typstignore | grep '[^[:blank:]]')
# recursively print all files that are not excluded via .typstignore
function enumerate {
local root="$1"
if [[ -f "$root" ]]; then
echo "$root"
else
local files
readarray -t files < <(find "$root" \
local root="$1"
if [[ -f "$root" ]]; then
echo "$root"
else
local files
readarray -t files < <(find "$root" \
-mindepth 1 -maxdepth 1 \
-not -name .git \
-not -name .typstignore)
# declare -p files >&2
# declare -p files >&2
local f
for f in "${files[@]}"; do
local include
include=1
local f
for f in "${files[@]}"; do
local include
include=1
local ignore
for ignore in "${ignores[@]}"; do
if [[ "$ignore" =~ ^! ]]; then
ignore="${ignore:1}"
if [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"!$ignore\"" >&2
include=1
fi
elif [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"$ignore\"" >&2
include=0
fi
done
if [[ "$include" == 1 ]]; then
enumerate "$f"
fi
done
fi
local ignore
for ignore in "${ignores[@]}"; do
if [[ "$ignore" =~ ^! ]]; then
ignore="${ignore:1}"
if [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"!$ignore\"" >&2
include=1
fi
elif [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"$ignore\"" >&2
include=0
fi
done
if [[ "$include" == 1 ]]; then
enumerate "$f"
fi
done
fi
}
# List of all files that get packaged