Skip to content

Commit

Permalink
move downloading timescale to prepare.sh file
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovinda committed Nov 5, 2024
1 parent 2ed6704 commit 18fec4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 0 additions & 9 deletions postgres-appliance/build_scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/create

for version in $DEB_PG_SUPPORTED_VERSIONS; do
sed -i "s/ main.*$/ main $version/g" /etc/apt/sources.list.d/pgdg.list

# add TimescaleDB repository
DISTRIB_CODENAME=$(sed </etc/os-release -ne 's/^VERSION_CODENAME=//p')
echo "deb [signed-by=/etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg] https://packagecloud.io/timescale/timescaledb/ubuntu/ ${DISTRIB_CODENAME} main" | tee /etc/apt/sources.list.d/timescaledb.list
curl -fsSL https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor | tee /etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg > /dev/null

apt-get update

if [ "$DEMO" != "true" ]; then
Expand Down Expand Up @@ -139,9 +133,6 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
else
echo "Skipping timescaledb-toolkit-postgresql-$version as it's not found in the repository"
fi

rm /etc/apt/sources.list.d/timescaledb.list
rm /etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg
fi

EXTRA_EXTENSIONS=()
Expand Down
4 changes: 4 additions & 0 deletions postgres-appliance/build_scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ for t in deb deb-src; do
done
curl -s -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg

# add TimescaleDB repository
echo "deb [signed-by=/etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg] https://packagecloud.io/timescale/timescaledb/ubuntu/ ${DISTRIB_CODENAME} main" | tee /etc/apt/sources.list.d/timescaledb.list
curl -fsSL https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor | tee /etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg > /dev/null

# Clean up
apt-get purge -y libcap2-bin
apt-get autoremove -y
Expand Down

0 comments on commit 18fec4f

Please sign in to comment.