Skip to content

Commit 494e14a

Browse files
committed
focal tdigest: fix self-contained check for the upgrade-chain SQL layout
1 parent ba33574 commit 494e14a

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎.github/workflows/build-tdigest-focal.yml‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,23 @@ jobs:
111111
exit $rc
112112
113113
- name: Verify the set is self-contained
114-
# Every runtime must ship its own extension control file and SQL, so a
115-
# package can never be paired with another version's SQL and there is no
116-
# separate -scripts package to depend on.
114+
# Every runtime must ship its own extension control file and the full SQL
115+
# tree, so a package can never be paired with another version's SQL and
116+
# there is no separate -scripts package to depend on. tdigest is installed
117+
# from the base script and reaches the built version through the shipped
118+
# upgrade chain, whose terminal script names that version (e.g.
119+
# tdigest--1.4.5--1.4.6.sql), so match either that or a direct
120+
# tdigest--<version>.sql.
117121
run: |
118122
rc=0
119123
for v in ${PG_VERSIONS}; do
120124
deb="$(ls packages/focal/tdigest/postgresql-${v}-tdigest_*.deb)"
121-
if ! dpkg-deb -c "$deb" | grep -q 'extension/tdigest\.control'; then
125+
contents="$(dpkg-deb -c "$deb")"
126+
if ! grep -q 'extension/tdigest\.control' <<<"$contents"; then
122127
echo "::error::PG${v} runtime ships no extension control file" >&2; rc=1
123128
fi
124-
if ! dpkg-deb -c "$deb" | grep -q "extension/tdigest--${TDIGEST_VERSION}\.sql"; then
125-
echo "::error::PG${v} runtime ships no tdigest--${TDIGEST_VERSION}.sql" >&2; rc=1
129+
if ! grep -qE "extension/tdigest--([0-9.]+--)?${TDIGEST_VERSION}\.sql" <<<"$contents"; then
130+
echo "::error::PG${v} runtime ships no SQL producing tdigest ${TDIGEST_VERSION}" >&2; rc=1
126131
fi
127132
done
128133
exit $rc

0 commit comments

Comments
 (0)