fix(fonts): Module failing with legacy templates (#141)

Issue described here:
https://github.com/blue-build/github-action/issues/16#issuecomment-1961862342
This commit is contained in:
fiftydinar 2024-02-24 19:03:10 +01:00 committed by GitHub
parent 1d50642f88
commit 2157b7eb5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
# Workaround for fonts module failing on legacy templates (with build.sh)
get_yaml_array() {
# creates array $1 with content at key $2 from $3
readarray "$1" < <(echo "$3" | yq -I=0 "$2")
}
export FONTS_MODULE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
for source in "$FONTS_MODULE_DIR"/sources/*.sh; do
@ -13,4 +19,4 @@ for source in "$FONTS_MODULE_DIR"/sources/*.sh; do
bash "$source" "${FONTS[@]}"
done
done