From 2d4274769eb5ac48d93bad6f46f955f0adda9244 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Nov 2023 10:24:58 +0100 Subject: [PATCH] Fix production.yaml.new config generation --- server/scripts/upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/scripts/upgrade.sh b/server/scripts/upgrade.sh index 39a6c4d7e..6e72e37cf 100755 --- a/server/scripts/upgrade.sh +++ b/server/scripts/upgrade.sh @@ -81,6 +81,8 @@ cd "$LATEST_VERSION_DIRECTORY" # Launch yarn to check if we have all required dependencies NOCLIENT=1 yarn install --production --pure-lockfile +OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest") + # Switch to latest code version rm -rf $PEERTUBE_PATH/peertube-latest ln -s "$LATEST_VERSION_DIRECTORY" $PEERTUBE_PATH/peertube-latest @@ -93,7 +95,7 @@ echo "" if [ -x "$(command -v git)" ]; then cd $PEERTUBE_PATH - git merge-file -p config/production.yaml "$LATEST_VERSION_DIRECTORY/config/production.yaml.example" "peertube-latest/config/production.yaml.example" | tee "config/production.yaml.new" > /dev/null + git merge-file -p config/production.yaml "$OLD_VERSION_DIRECTORY/config/production.yaml.example" "peertube-latest/config/production.yaml.example" | tee "config/production.yaml.new" > /dev/null echo "$PEERTUBE_PATH/config/production.yaml.new generated" echo "You can review it and replace your existing production.yaml configuration" else