Skip to content

Commit a834b11

Browse files
authored
[CI] Drop alert shortcode and update build log check script (#8482)
1 parent 3208656 commit a834b11

File tree

5 files changed

+29
-34
lines changed

5 files changed

+29
-34
lines changed

.warnings-skip-list.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
_filename-error
22
The following package was not found and will be installed
3+
4+
# Ignore warnings that first appeared in:
5+
#
6+
# - https://github.com/open-telemetry/opentelemetry.io/pull/8469
7+
#
8+
# Drop once Hugo is fixed, via https://github.com/gohugoio/hugo/issues/7982
9+
# or @chalin's PR (TBC).
10+
311
WARN Failed to get translated string for language "pt" and ID "community_introduce": %!s(<nil>)
412
WARN Failed to get translated string for language "pt" and ID "community_learn": %!s(<nil>)
513
WARN Failed to get translated string for language "pt" and ID "community_using": %!s(<nil>)
@@ -23,4 +31,4 @@ WARN Failed to get translated string for language "pt" and ID "feedback_questio
2331
WARN Failed to get translated string for language "pt" and ID "feedback_positive": %!s(<nil>)
2432
WARN Failed to get translated string for language "pt" and ID "feedback_negative": %!s(<nil>)
2533
WARN Failed to get translated string for language "pt" and ID "ui_pager_prev": %!s(<nil>)
26-
WARN Failed to get translated string for language "pt" and ID "ui_pager_next": %!s(<nil>)
34+
WARN Failed to get translated string for language "pt" and ID "ui_pager_next": %!s(<nil>)

config/_default/hugo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ languages:
4242
docker-compose-v2: |
4343
`docker-compose` は非推奨です. 詳細は、
4444
[Migrate to Compose V2](https://docs.docker.com/compose/migrate/) を確認してください。
45-
pt: # cSpell:ignore Português Projeto
45+
pt:
4646
languageName: Português
4747
languageCode: pt-BR
4848
params:

i18n/en.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Blockquote alert types
2+
# https://gohugo.io/render-hooks/blockquotes/#alerts
3+
# TODO: Upstream to Docsy
4+
5+
caution= "Caution"
6+
important = "Important"
7+
note = "Note"
8+
tip = "Tip"
9+
warning = "Warning"
10+
111
# Docsy overrides
212

313
[ui_search]

layouts/_shortcodes/alert.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

scripts/check-build-log.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@
55

66
BUILD_LOG=tmp/build-log.txt
77
WARNINGS_SKIP_LIST=.warnings-skip-list.txt
8+
WARNING_OR_ERROR_REGEX='warn(ing)?|error'
89

9-
WARNINGS=`grep -E -ie 'warn(ing)?|error' $BUILD_LOG | grep -v -f $WARNINGS_SKIP_LIST`
10+
echo "Checking for WARNINGs or ERRORs in build log at $BUILD_LOG"
11+
echo " > Using regex: /$WARNING_OR_ERROR_REGEX/i"
12+
echo " > Skipping warnings listed in $WARNINGS_SKIP_LIST"
13+
14+
WARNINGS=`grep -E -ie $WARNING_OR_ERROR_REGEX $BUILD_LOG | grep -v -f <(grep -Ev '^(#|[[:space:]]*)$' $WARNINGS_SKIP_LIST 2>/dev/null || true)`
1015

1116
if [ -e $BUILD_LOG ]; then
1217
if [ -n "$WARNINGS" ]; then
13-
echo "WARNINGs or ERRORs found in build log:"
18+
echo "Unexpected WARNINGs or ERRORs found in build log:"
1419
echo "$WARNINGS"
1520
echo
1621
echo "INFO: if this is run in the context of a GitHub job, you can see"
1722
echo " the full build log output from the previous step."
1823
exit 1
24+
else
25+
echo "No WARNINGs or ERRORs found in build log."
1926
fi
2027
else
2128
echo "INFO: $BUILD_LOG file not found."

0 commit comments

Comments
 (0)