Skip to content

Commit 81c6bb8

Browse files
felickzCopilot
andauthored
Fix publish summary showing no result for go/python ext-library-sources (#210)
go and python only ship an ext (model/extension) pack, not ext-library-sources - that pack only exists for csharp/java (see the library_sources_extensions job's matrix in publish.yml). The summary script incorrectly reused the ext-pack language list to also gate the ext-library-sources column, so go/python were expected to have a result there and rendered '❓ no result' instead of 'n/a' (seen in the v0.7.2 release notes). Introduces a separate EXT_LIBRARY_SOURCES_LANGUAGES list (csharp java) matching that job's matrix, and checks it independently per column. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0baa8375-5974-4c3a-904d-707bc1c493dd
1 parent ee16cf9 commit 81c6bb8

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎.github/scripts/build-publish-summary.sh‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ fi
3636

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

4146
lang_label() {
4247
case "$1" in
@@ -59,6 +64,14 @@ is_ext_language() {
5964
return 1
6065
}
6166

67+
is_ext_library_sources_language() {
68+
local lang="$1"
69+
for l in "${EXT_LIBRARY_SOURCES_LANGUAGES[@]}"; do
70+
[ "$l" == "$lang" ] && return 0
71+
done
72+
return 1
73+
}
74+
6275
# Escapes a string for safe embedding in an RE2 regex pattern (used to match
6376
# a specific version tag literally in download_badge's search regex below).
6477
regex_escape() {
@@ -146,7 +159,11 @@ echo "| --- | --- | --- | --- | --- |"
146159
for lang in "${LANGUAGES[@]}"; do
147160
row="| $(lang_label "$lang") |"
148161
for type in "${TYPES[@]}"; do
149-
if { [ "$type" == "ext" ] || [ "$type" == "ext-library-sources" ]; } && ! is_ext_language "$lang"; then
162+
if [ "$type" == "ext" ] && ! is_ext_language "$lang"; then
163+
row="$row n/a |"
164+
continue
165+
fi
166+
if [ "$type" == "ext-library-sources" ] && ! is_ext_library_sources_language "$lang"; then
150167
row="$row n/a |"
151168
continue
152169
fi

0 commit comments

Comments
 (0)