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:
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
find . -iname "*.typ" | xargs typstyle -i
|
||||
find . -iname "*.typ" | xargs typstyle -i
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user