Skip to content

Commit

Permalink
Move changre to hydrate
Browse files Browse the repository at this point in the history
  • Loading branch information
jokesterfr committed Aug 22, 2024
1 parent 59602e5 commit ea3f27d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions assets/hydrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ sed -ie "s/define('_PS_MODE_DEV_', true);/define('_PS_MODE_DEV_',\ false);/g" "$
# 8. Make a database dump
mysqldump -u ${DB_USER} --password=${DB_PASSWD} ${DB_NAME} > ${DUMP_FILE};
# TODO zip the dump and support both plain and zipped outputs from restoration to allow overrides

# fixing logs flooded by "mcrypt_decrypt() is deprecated"
if echo "$PS_VERSION" | grep "^1.6" > /dev/null; then
sed -i -e "s~'PS_CIPHER_ALGORITHM','1'~'PS_CIPHER_ALGORITHM','0'~" "$DUMP_FILE"
fi
echo "✅ MySQL dump performed"

# 9. Cache clear
Expand Down
3 changes: 0 additions & 3 deletions assets/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ set -eu

PS_FOLDER=${PS_FOLDER:?missing PS_FOLDER}
PS_VERSION=$(awk 'NR==1{print $2}' "$PS_FOLDER/VERSION")
DUMP_FILE=/dump.sql

add_polyfill_console () {
mkdir -p "$PS_FOLDER/bin"
Expand All @@ -17,8 +16,6 @@ patch_1_6 () {
echo "User-agent: *" > "$PS_FOLDER/admin/robots.txt"
echo "Disallow: /" >> "$PS_FOLDER/admin/robots.txt"
add_polyfill_console
# fixing logs flooded by "mcrypt_decrypt() is deprecated"
sed -i -e "s~'PS_CIPHER_ALGORITHM','1'~'PS_CIPHER_ALGORITHM','0'~" "$DUMP_FILE"
}

patch_1_7_6 () {
Expand Down

0 comments on commit ea3f27d

Please sign in to comment.