From: Dessalines Date: Mon, 22 Jun 2020 16:43:09 +0000 (-0400) Subject: Fixing up the migration script some more. X-Git-Url: http://these/git/%7B%60%24%7BghostArchiveUrl%7D/static/%7B%60%24%7BwebArchiveUrl%7D/save/%24%7BencodeURIComponent%28url%29%7D%60%7D?a=commitdiff_plain;h=b161cad982327c8511fb7396654a42c529fb22c0;p=lemmy.git Fixing up the migration script some more. --- diff --git a/RELEASES.md b/RELEASES.md index 5a4c7645..63c5ea5c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,33 @@ +# Lemmy v0.7.0 Release (2020-06-2X) + +## Breaking Change to our image server: Pictshare to Pict-rs migration guide + +This release replaces [pictshare](https://github.com/HaschekSolutions/pictshare) with [pict-rs](https://git.asonix.dog/asonix/pict-rs), and a script must be run on your server to upgrade. + +To update, run: + +``` +cd /lemmy +wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml +wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/migrate-pictshare-to-pictrs.bash +sudo bash migrate-pictshare-to-pictrs.bash +``` + +Apart from that, we've closed [~90 issues!](https://github.com/LemmyNet/lemmy/milestone/16?closed=1), including: + +- Site-wide list of recent comments. +- Reconnecting websockets. +- Lots more themes, including a default light one. +- Expandable embeds for post links (and thumbnails), from iframely. +- Better icons. +- Emoji autocomplete to post and message bodies, and an Emoji Picker. +- Post body now searchable. +- Community title and description is now searchable. +- Simplified cross-posts. +- Better documentation. +- LOTS more languages. +- Lots of bugs squashed. + # Lemmy v0.6.0 Release (2020-01-16) `v0.6.0` is here, and we've closed [41 issues!](https://github.com/LemmyNet/lemmy/milestone/15?closed=1) diff --git a/docker/prod/migrate-pictshare-to-pictrs.bash b/docker/prod/migrate-pictshare-to-pictrs.bash index f4294e13..8229eb28 100644 --- a/docker/prod/migrate-pictshare-to-pictrs.bash +++ b/docker/prod/migrate-pictshare-to-pictrs.bash @@ -23,41 +23,23 @@ if [[ -z $(docker-compose ps | grep pictrs) ]]; then exit fi -if [[ -z $(type -P convert) ]]; then - echo "Installing imagemagick to convert .webp images to .jpg" - apt install imagemagick -y -else - echo "Imagemagick already installed." -fi - # echo "Stopping Lemmy so that users dont upload new images during the migration" # docker-compose stop lemmy -echo "Importing pictshare images to pict-rs" pushd volumes/pictshare/ +echo "Importing pictshare images to pict-rs..." IMAGE_NAMES=* for image in $IMAGE_NAMES; do IMAGE_PATH="$(pwd)/$image/$image" if [[ ! -f $IMAGE_PATH ]]; then continue fi - if [ ${IMAGE_PATH: -5} == ".webp" ]; then - NEW_IMAGE_PATH=$(echo "$IMAGE_PATH" | sed "s/\.webp$/\.jpg/g") - convert "$IMAGE_PATH" "$NEW_IMAGE_PATH" - IMAGE_PATH="$NEW_IMAGE_PATH" - continue - fi echo -e "\nImporting $IMAGE_PATH" ret=0 - curl --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$? - # if [[ $ret != 0 ]]; then - # read -p "Failed to import $IMAGE_PATH, continue? " yn - # case $yn in - # [Yy]* ) ;; - # [Nn]* ) exit;; - # * ) exit;; - # esac - # fi + curl --silent --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$? + if [[ $ret != 0 ]]; then + echo "Error for $IMAGE_PATH : $ret" + fi done echo "Fixing permissions on pictshare folder" @@ -74,5 +56,5 @@ echo "Moving pictshare data folder to pictshare_backup" mv volumes/pictshare volumes/pictshare_backup echo "Migration done, starting Lemmy again" -echo "If everything went well, you can delete ./volumes/pictshare_backup/ and uninstall imagemagick" +echo "If everything went well, you can delete ./volumes/pictshare_backup/" docker-compose start lemmy