Skip to content

Commit

Permalink
Fix typo (hetzneronline#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenja11 authored Apr 30, 2024
1 parent 7665035 commit 806b59c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts-metadata/check-meta-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updated_variables=".github/scripts-metadata/updated-variables.txt"
echo $markdown_file

# Extract YAML front matter from Markdown file and turn it into a JSON file
metadata=$(awk '/^---$/{f=!f;next}f' "$markdown_file" | yq eval -o=json - > "$output_file")
metadata=$(head -n 20 "$markdown_file" | awk '/^---$/{f=!f;next}f' | yq eval -o=json - > "$output_file")

# Validate metadata against the JSON schema
npx ajv-cli validate -s "$json_schema" -d "$output_file" --all-errors --errors=line > "$validate_file" 2>&1
Expand All @@ -27,6 +27,6 @@ done
# Replace the original variable messages with error messages
awk -F'=' 'NR==FNR{a[$1]=$2; next} {if($1 in a) {$2=a[$1]} print}' OFS='=' "$new_variables" "$variables" > "$updated_variables"

# Update formatting to make it work for `source` and `envsubst` in `.guthub/workflows/check-metadata-in-files.yml`
# Update formatting to make it work for `source` and `envsubst` in `.github/workflows/check-metadata-in-files.yml`
sed -i -e 's/SPDX-License-Identifier/license/g' -e "s/^\(.*\)=\(.*\)$/\\1='\2'/g" -e 's/^/export /' "$updated_variables"
echo "$updated_variables"

0 comments on commit 806b59c

Please sign in to comment.