File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed
Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ pipeline:
3434 --build-arg PGVERSION="$PGVERSION" \
3535 --build-arg BASE_IMAGE="$BASE_IMAGE" \
3636 --build-arg PGOLDVERSIONS="14 15 16" \
37- --build-arg TIMESCALEDB="2.17.2" \
3837 -t "$ECR_TEST_IMAGE" \
3938 --push .
4039
@@ -64,7 +63,6 @@ pipeline:
6463 --build-arg PGVERSION="$PGVERSION" \
6564 --build-arg BASE_IMAGE="$BASE_IMAGE" \
6665 --build-arg PGOLDVERSIONS="14 15 16" \
67- --build-arg TIMESCALEDB="2.17.2" \
6866 -t "$ECR_TEST_IMAGE" \
6967 --push .
7068 cdp-promote-image "$ECR_TEST_IMAGE"
@@ -96,7 +94,6 @@ pipeline:
9694 --build-arg PGVERSION="$PGVERSION" \
9795 --build-arg BASE_IMAGE="$BASE_IMAGE" \
9896 --build-arg PGOLDVERSIONS="14 15 16" \
99- --build-arg TIMESCALEDB="2.17.2" \
10097 -t "$ECR_TEST_IMAGE" \
10198 --push .
10299 cdp-promote-image "$ECR_TEST_IMAGE"
Original file line number Diff line number Diff line change 11ARG BASE_IMAGE=ubuntu:22.04
22ARG PGVERSION=17
3- ARG TIMESCALEDB="2.15.3 2.18.0"
43ARG DEMO=false
54ARG COMPRESS=false
65ARG ADDITIONAL_LOCALES=
@@ -44,7 +43,6 @@ COPY build_scripts/base.sh /builddeps/
4443COPY --from=dependencies-builder /builddeps/*.deb /builddeps/
4544
4645ARG PGVERSION
47- ARG TIMESCALEDB
4846ARG TIMESCALEDB_APACHE_ONLY=true
4947ARG TIMESCALEDB_TOOLKIT=true
5048ARG COMPRESS
Original file line number Diff line number Diff line change @@ -121,18 +121,18 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
121121 " postgresql-${version} -pg-stat-kcache" \
122122 " ${EXTRAS[@]} "
123123
124- # Clean up timescaledb versions except the highest compatible version
124+ # Clean up timescaledb versions except the highest compatible and transition version
125125 exclude_patterns=()
126- exclude_patterns_tsl=()
127- for ts_version in ${TIMESCALEDB} ; do
126+ prev_highest_ver=" $ts_highest_ver "
127+ ts_highest_ver=$( find " /usr/lib/postgresql/$version /lib/" -name ' timescaledb-2.*.so' | sed -rn ' s/.*timescaledb-([1-9]+\.[0-9]+\.[0-9]+)\.so$/\1/p' | sort -rV | head -n1)
128+ if [ " $prev_highest_ver " != " $ts_highest_ver " ]; then
129+ ts_transition_version=" $prev_highest_ver "
130+ fi
131+ for ts_version in " $ts_transition_version " " $ts_highest_ver " ; do
128132 exclude_patterns+=(! -name timescaledb-" ${ts_version} " .so)
129- exclude_patterns_tsl +=(! -name timescaledb-tsl-" ${ts_version} " .so)
133+ exclude_patterns +=(! -name timescaledb-tsl-" ${ts_version} " .so)
130134 done
131- find /usr/lib/postgresql/" ${version} " /lib/ -name ' timescaledb-2.*.so' " ${exclude_patterns[@]} " -delete;
132-
133- if [ " ${TIMESCALEDB_APACHE_ONLY} " != " true" ]; then
134- find /usr/lib/postgresql/" ${version} " /lib/ -name ' timescaledb-tsl-2.*.so' " ${exclude_patterns_tsl[@]} " -delete;
135- fi
135+ find " /usr/lib/postgresql/$version /lib/" \( -name ' timescaledb-2.*.so' -o -name ' timescaledb-tsl-2.*.so' \) " ${exclude_patterns[@]} " -delete
136136
137137 # Install 3rd party stuff
138138
You can’t perform that action at this time.
0 commit comments