Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/scripts/build-publish-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ fi

LANGUAGES=(cpp csharp go java javascript python ruby)
TYPES=(src lib ext ext-library-sources)
# Languages with an `ext` (model/extension) pack - matches the `extensions` job's matrix.
EXT_LANGUAGES=(csharp go java python)
# Languages with an `ext-library-sources` pack - matches the `library_sources_extensions`
# job's matrix. This is a strict subset of EXT_LANGUAGES: go/python ship `ext` packs but
# have no `ext-library-sources` pack, so they must not be expected to have a result for it.
EXT_LIBRARY_SOURCES_LANGUAGES=(csharp java)

lang_label() {
case "$1" in
Expand All @@ -59,6 +64,14 @@ is_ext_language() {
return 1
}

is_ext_library_sources_language() {
local lang="$1"
for l in "${EXT_LIBRARY_SOURCES_LANGUAGES[@]}"; do
[ "$l" == "$lang" ] && return 0
done
return 1
}

# Escapes a string for safe embedding in an RE2 regex pattern (used to match
# a specific version tag literally in download_badge's search regex below).
regex_escape() {
Expand Down Expand Up @@ -146,7 +159,11 @@ echo "| --- | --- | --- | --- | --- |"
for lang in "${LANGUAGES[@]}"; do
row="| $(lang_label "$lang") |"
for type in "${TYPES[@]}"; do
if { [ "$type" == "ext" ] || [ "$type" == "ext-library-sources" ]; } && ! is_ext_language "$lang"; then
if [ "$type" == "ext" ] && ! is_ext_language "$lang"; then
row="$row n/a |"
continue
fi
if [ "$type" == "ext-library-sources" ] && ! is_ext_library_sources_language "$lang"; then
row="$row n/a |"
continue
fi
Expand Down