Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: word wrapping for readability #1293

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
32 changes: 29 additions & 3 deletions ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,21 @@ function initiate_upgrade {
rm -rf "${PGDATANEW:?}/"

if [ "$IS_NIX_UPGRADE" = "true" ]; then
LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $PGBINNEW/initdb --encoding=$SERVER_ENCODING --lc-collate=$SERVER_LC_COLLATE --lc-ctype=$SERVER_LC_CTYPE -L $PGSHARENEW -D $PGDATANEW/ --username=supabase_admin" -s "$SHELL" postgres
LC_ALL=en_US.UTF-8 \
LC_CTYPE=$SERVER_LC_CTYPE \
LC_COLLATE=$SERVER_LC_COLLATE \
LANGUAGE=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LOCALE_ARCHIVE=/usr/lib/locale/locale-archive \
su -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh \
&& $PGBINNEW/initdb \
--encoding=$SERVER_ENCODING \
--lc-collate=$SERVER_LC_COLLATE \
--lc-ctype=$SERVER_LC_CTYPE \
-L $PGSHARENEW \
-D $PGDATANEW/ \
--username=supabase_admin" \
-s "$SHELL" postgres
else
su -c "$PGBINNEW/initdb -L $PGSHARENEW -D $PGDATANEW/ --username=supabase_admin" -s "$SHELL" postgres
fi
Expand Down Expand Up @@ -449,7 +463,13 @@ EOF
if [ "$IS_NIX_BASED_SYSTEM" = "true" ]; then
UPGRADE_COMMAND=". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $UPGRADE_COMMAND"
fi
LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND --check" -s "$SHELL" postgres
LC_ALL=en_US.UTF-8 \
LC_CTYPE=$SERVER_LC_CTYPE \
LC_COLLATE=$SERVER_LC_COLLATE \
LANGUAGE=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LOCALE_ARCHIVE=/usr/lib/locale/locale-archive \
su -pc "$UPGRADE_COMMAND --check" -s "$SHELL" postgres

echo "10. Stopping postgres; running pg_upgrade"
# Extra work to ensure postgres is actually stopped
Expand All @@ -465,7 +485,13 @@ EOF
CI_stop_postgres
fi

LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND" -s "$SHELL" postgres
LC_ALL=en_US.UTF-8 \
LC_CTYPE=$SERVER_LC_CTYPE \
LC_COLLATE=$SERVER_LC_COLLATE \
LANGUAGE=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LOCALE_ARCHIVE=/usr/lib/locale/locale-archive \
su -pc "$UPGRADE_COMMAND" -s "$SHELL" postgres

# copying custom configurations
echo "11. Copying custom configurations"
Expand Down
Loading