From 3d3913686526f4495cca6c0234ea06faf46b1bfe Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 7 May 2017 23:22:41 +0200 Subject: [PATCH 01/24] Sync (#11) * [enh] Switch to tagged release * [enh] Switch to tagged release on upgrade * [fix] Restore pg dump Restore pg dump with mastodon user. * Change version on manifest * [fix] Change rm dump to ynh_secure_remove * [fix] Upgrade from 1.3.3 Fix error: Your local changes to the following files would be overwritten by merge: .babelrc .dockerignore .editorconfig .env.production.sample .gitignore .rubocop.yml .travis.yml Capfile Dockerfile README.md Vagrantfile .... * [fix] Owner of live * [fix] Reinstall dependencies on restore * Return to home * [fix] Jenkins upgrade error * Check .fonctions * Remove unneeded comment * Add apt lists to backup * Change .list name on backup * Copy Apt .lists on restore * version 1.3.3 on manifest * Remove admin instructions + TODO --- README.md | 38 ++++++++++++++++++++++---------------- manifest.json | 2 +- scripts/backup | 4 +++- scripts/remove | 6 ++++++ scripts/restore | 41 ++++++++++++++++++++++++++++++++++++----- scripts/upgrade | 6 +++--- 6 files changed, 71 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1b295c4..2b4d9ea 100644 --- a/README.md +++ b/README.md @@ -21,19 +21,21 @@ Mastodon est un réseau social gratuit et open source. Une alternative décentra `$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git` -Une fois l'installation effectuée, vous pouvez créer un compte manuellement sur Mastodon depuis votre navigateur. Lorsque vous avez crée le premier utilisateur vous pouvez créer l'administrateur de votre Mastodon. Pour celà, il faut impérativement passer par une interface en ligne de commande et taper les commandes suivantes : +L'utilisateur admin est crée automatiquement comme: user@domain.tld -**se connecter en sudo sur l'utilisateur** +Une fois l'installation effectuée, vous pouvez créer un compte manuellement sur Mastodon depuis votre navigateur. Lorsque vous avez crée le premier utilisateur vous pouvez créer l'administrateur de votre Mastodon. Pour celà, il faut impérativement passer par une interface en ligne de commande et taper les commandes suivantes : -`$ sudo su mastodon` +**se connecter en sudo sur l'utilisateur** -**se placer dans le répertoire où est installé Mastodon** +`$ sudo su mastodon` -`$ cd /opt/mastodon/live` +**se placer dans le répertoire où est installé Mastodon** -**lancer la commande de création de l'administrateur** +`$ cd /opt/mastodon/live` -`$ RAILS_ENV=production bin/bundle exec rails mastodon:make_admin USERNAME=*Nom de votre utilisateur*` +**lancer la commande de création de l'administrateur** + +`$ RAILS_ENV=production bin/bundle exec rails mastodon:make_admin USERNAME=*Nom de votre utilisateur*` ### Mise à jour @@ -55,19 +57,21 @@ Mastodon is a free, open-source social network. A decentralized alternative to c `$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git` -After installation, you can create an account manually on Mastodon from your browser. When you have created the first user you can create the administrator of your Mastodon. For this, it is imperative to go through a command line and type the following commands: +The admin user is automatically created as: user@domain.tld -**sudo to the user** +After installation, you can create an account manually on Mastodon from your browser. When you have created the first user you can create the administrator of your Mastodon. For this, it is imperative to go through a command line and type the following commands: -`$ sudo su mastodon` +**sudo to the user** -**change directory where Mastodon is installed** +`$ sudo su mastodon` -`$ cd /opt/mastodon/live` +**change directory where Mastodon is installed** -**launch the command to create the administrator** +`$ cd /opt/mastodon/live` -`$ RAILS_ENV=production bin/bundle exec rails mastodon:make_admin USERNAME=*username*` +**launch the command to create the administrator** + +`$ RAILS_ENV=production bin/bundle exec rails mastodon:make_admin USERNAME=*username*` ### Update @@ -83,5 +87,7 @@ It seems important to close the inscriptions for your Mastodon, so that it remai - [x] Fix upgrade - [x] [Create automatic user](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Administration-guide.md#creating-users-while-registration-is-closed) -- [ ] Fix restore -- [ ] Install from a release \ No newline at end of file +- [x] Fix restore +- [x] Install from a release +- [ ] Tune [Create automatic user](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Administration-guide.md#creating-users-while-registration-is-closed) +- [ ] Fix errors on jenkins diff --git a/manifest.json b/manifest.json index 8b93539..fa2886b 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "1.1.1", + "version": "1.3.3", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL v3.0", "maintainer": { diff --git a/scripts/backup b/scripts/backup index bb90997..cc94aa4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -29,10 +29,12 @@ ynh_backup "/etc/cron.d/${app}" "cron.conf" ynh_backup "/etc/systemd/system/mastodon-web.service" "systemd_web.service" ynh_backup "/etc/systemd/system/mastodon-sidekiq.service" "systemd_sidekiq.service" ynh_backup "/etc/systemd/system/mastodon-streaming.service" "systemd_streaming.service" +ynh_backup "/etc/apt/sources.list.d/backports.list" "apt_backports.list" +ynh_backup "/etc/apt/sources.list.d/yarn.list" "apt_yarn.list" # Backup db sudo su - postgres < mastodon_db.sql COMMANDS ynh_backup "/var/lib/postgresql/${app}_db.sql" "${app}_db.sql" -ynh_secure_remove /var/lib/postgresql/mastodon_db.sql \ No newline at end of file +ynh_secure_remove /var/lib/postgresql/mastodon_db.sql diff --git a/scripts/remove b/scripts/remove index 373d028..1b2c405 100644 --- a/scripts/remove +++ b/scripts/remove @@ -3,6 +3,12 @@ # Exit on command errors and treat unset variables as an error set -u +if [ ! -e .fonctions ]; then + # Get file fonction if not been to the current directory + sudo cp ../settings/scripts/.fonctions ./.fonctions + sudo chmod a+rx .fonctions +fi + source .fonctions # Loads the generic functions usually used in the script # Source app helpers source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index 946a62b..3a2eeaf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,6 +65,39 @@ fi # Create user unix sudo adduser $app --home /opt/$app --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password --disabled-login +# Reinstall dependencies + # Install debian package + ynh_package_install imagemagick libpq-dev libxml2-dev libxslt1-dev file curl apt-transport-https + + # Install redis package + ynh_package_install redis-server redis-tools + + # Install postgresql + ynh_package_install postgresql postgresql-contrib + + # Install Ruby + ynh_package_install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev + + # Install source.list debian package backports & yarn + sudo cp ./apt_backports.list /etc/apt/sources.list.d/backports.list + sudo curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + sudo cp ./apt_yarn.list /etc/apt/sources.list.d/yarn.list + ynh_package_update + + # Install debian package backports + sudo apt-get -t jessie-backports -y install ffmpeg + + # Install de Node.js + pushd /opt + curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - + sudo apt-get -y install nodejs + + # Install Yarn + ynh_package_install yarn + + # Return to home + popd + # Restore sources & data sudo cp -a ./sources/. "$final_path" @@ -74,8 +107,6 @@ sudo chown -R $app: "$final_path" # Debug sudo ls -alh "$final_path" -# Change directory for create user & database postgresql - # Set UTF8 encoding by default sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='false' where datname='template1';" @@ -102,11 +133,11 @@ RAILS_ENV=production bin/bundle exec rails db:migrate RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS -# copy database +# copy database dump sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path sudo chmod a+r $final_path/mastodon_db.sql -# Restore database +# Restore database dump sudo su - $app < Date: Sun, 28 May 2017 17:31:51 +0200 Subject: [PATCH 03/24] upgrade from pre-release --- scripts/install | 4 +--- scripts/upgrade | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 1634c52..ebe4569 100644 --- a/scripts/install +++ b/scripts/install @@ -95,11 +95,9 @@ CLONECOMMANDS # Switch branch to tagged release cd $final_path/live -url=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | sort -r | head -1 | cut -d\" -f4) -version=$(echo $url | cut -d/ -f8) sudo su - $app < Date: Mon, 29 May 2017 14:04:52 +0200 Subject: [PATCH 04/24] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b213d0..e6aae5e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-_--_-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-1.4.1-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) From ad476aad67ea89ab2d0882fdb62414008448a620 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sat, 1 Jul 2017 17:39:58 +0200 Subject: [PATCH 05/24] error on ynh_secure_remove --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index cc94aa4..0b86c43 100644 --- a/scripts/backup +++ b/scripts/backup @@ -37,4 +37,4 @@ sudo su - postgres < mastodon_db.sql COMMANDS ynh_backup "/var/lib/postgresql/${app}_db.sql" "${app}_db.sql" -ynh_secure_remove /var/lib/postgresql/mastodon_db.sql +rm /var/lib/postgresql/mastodon_db.sql From 061bb38b0081770cb5e70cc8545321f7f5629c25 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sat, 1 Jul 2017 18:18:23 +0200 Subject: [PATCH 06/24] error on script --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 0b86c43..f93da22 100644 --- a/scripts/backup +++ b/scripts/backup @@ -37,4 +37,4 @@ sudo su - postgres < mastodon_db.sql COMMANDS ynh_backup "/var/lib/postgresql/${app}_db.sql" "${app}_db.sql" -rm /var/lib/postgresql/mastodon_db.sql +#rm /var/lib/postgresql/mastodon_db.sql From d833f59222b6adacf8a5b559b450c6ebfcadbdea Mon Sep 17 00:00:00 2001 From: nemsia Date: Mon, 24 Jul 2017 00:01:52 +0200 Subject: [PATCH 07/24] Add Install Mastodon with YunoHost Link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c985c53..dd7c753 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ [![Yunohost version](https://img.shields.io/badge/yunohost-2.5.6_tested-orange.svg?style=flat)](https://github.com/YunoHost/yunohost) [![GitHub issues](https://img.shields.io/github/issues/YunoHost-Apps/mastodon_ynh.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/issues) +[![Install Mastodon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=mastodon) + :warning: MAJ 05/06/17 :Cette application peut maintenant fonctionner sur ARM, mais l'installation prend plusieurs heures et il faut ajouter un swapfile de 1Go. :warning: Cette application utilise les packages backports de Debian, nous vous recommendons de ne pas installer cette application directement en production From 03074519069383688f69ee7f0dc619b067d9917f Mon Sep 17 00:00:00 2001 From: nemsia Date: Mon, 24 Jul 2017 01:15:15 +0200 Subject: [PATCH 08/24] Add libicu-dev and libidn11-dev --- scripts/backup | 4 ---- scripts/install | 2 +- scripts/upgrade | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/backup b/scripts/backup index 2e26381..e4a5bba 100644 --- a/scripts/backup +++ b/scripts/backup @@ -43,9 +43,5 @@ sudo su - postgres < mastodon_db.sql COMMANDS ynh_backup "/var/lib/postgresql/${app}_db.sql" "${app}_db.sql" -<<<<<<< HEAD -#rm /var/lib/postgresql/mastodon_db.sql -======= # Fix backup fail on yunohost 2.6 #ynh_secure_remove /var/lib/postgresql/mastodon_db.sql ->>>>>>> refs/remotes/YunoHost-Apps/master diff --git a/scripts/install b/scripts/install index f769a8b..f32252f 100644 --- a/scripts/install +++ b/scripts/install @@ -41,7 +41,7 @@ ynh_app_setting_set $app language $language sudo adduser $app --home /opt/$app --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password --disabled-login # Install debian package -ynh_package_install imagemagick libpq-dev libxml2-dev libxslt1-dev file curl apt-transport-https pkg-config libprotobuf-dev protobuf-compiler +ynh_package_install imagemagick libpq-dev libxml2-dev libxslt1-dev file curl apt-transport-https pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev # Install redis package ynh_package_install redis-server redis-tools diff --git a/scripts/upgrade b/scripts/upgrade index dae1d8d..99ae13f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,7 +65,7 @@ if [[ $node_version =~ ^v4.*$ ]]; then fi # add additional package for release 1.4 -ynh_package_install pkg-config libprotobuf-dev protobuf-compiler +ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev # Apply Mastodon upgrade sudo su - $app < 1.4.2 migration prepare_for_foreign_keys is needed -RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys +RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate From 99991f4b09f42b6ca8978fc8eb1d0c361060edc4 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 2 Aug 2017 15:14:48 +0200 Subject: [PATCH 09/24] Readme 1.5.0 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14cfa07..c091015 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-1.4.7-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-1.5.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) @@ -34,7 +34,7 @@ ajouter cette ligne dans /etc/fstab ``` /swapfile none swap sw 0 0 ``` - +5 ### Installation #### Utilisation de __screen__ en cas de déconnection From 727140d078f4141073404fbbfcb34ea769af5af5 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 2 Aug 2017 15:16:44 +0200 Subject: [PATCH 10/24] Manifest 1.5.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index ccf281d..c616512 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "1.4.7", + "version": "1.5.0", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL v3.0", "maintainer": { From 093c4a07a3ba259da4aafc69288e7d5910248845 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 2 Aug 2017 15:18:43 +0200 Subject: [PATCH 11/24] Fix error on readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c091015..211fb68 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ ajouter cette ligne dans /etc/fstab ``` /swapfile none swap sw 0 0 ``` -5 ### Installation #### Utilisation de __screen__ en cas de déconnection From 6b3074f01066d2adaf342f092a9a1d3ac4c99bb9 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 2 Aug 2017 15:20:00 +0200 Subject: [PATCH 12/24] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 211fb68..f8fafe7 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ ajouter cette ligne dans /etc/fstab ``` /swapfile none swap sw 0 0 ``` + ### Installation #### Utilisation de __screen__ en cas de déconnection From c9c543ee209a29bcde8a367a644f5d5dcb7f7ad2 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 9 Aug 2017 23:58:51 +0200 Subject: [PATCH 13/24] Add additional package for arm upgrade --- scripts/install | 2 +- scripts/upgrade | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index f32252f..217ca34 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,7 @@ ynh_package_install imagemagick libpq-dev libxml2-dev libxslt1-dev file curl apt ynh_package_install redis-server redis-tools # Install postgresql -ynh_package_install postgresql postgresql-contrib +ynh_package_install postgresql postgresql-contrib postgresql-server-dev-9.4 # Install Ruby ynh_package_install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev diff --git a/scripts/upgrade b/scripts/upgrade index 99ae13f..6726f92 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,8 +64,8 @@ if [[ $node_version =~ ^v4.*$ ]]; then sudo apt-get -y install nodejs fi -# add additional package for release 1.4 -ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev +# add additional package for upgrade +ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-9.4 # Apply Mastodon upgrade sudo su - $app < Date: Thu, 10 Aug 2017 00:28:54 +0200 Subject: [PATCH 14/24] Update to 1.5.1 --- README.md | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8fafe7..11a58fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-1.5.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-1.5.1-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/manifest.json b/manifest.json index c616512..830f27f 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "1.5.0", + "version": "1.5.1", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL v3.0", "maintainer": { From f224a7d13c67fe5a3d29fcec34dcfbf1b798be9f Mon Sep 17 00:00:00 2001 From: nemsia Date: Thu, 10 Aug 2017 18:11:34 +0200 Subject: [PATCH 15/24] New method to select pre-release --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b088eca..28564cf 100644 --- a/scripts/install +++ b/scripts/install @@ -104,7 +104,7 @@ CLONECOMMANDS cd $final_path/live sudo su - $app < Date: Thu, 7 Sep 2017 23:04:29 +0200 Subject: [PATCH 16/24] Remove prepare_for_foreign_keys --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 371593e..11f9966 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,7 +72,7 @@ pushd ~/live bin/bundle install yarn install --pure-lockfile # For 1.4.1 -> 1.4.2 migration prepare_for_foreign_keys is needed -RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys +# RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate From 6d99d517a8ce0daf779efd5c086b7e512d2044c6 Mon Sep 17 00:00:00 2001 From: Nemsia Date: Mon, 11 Sep 2017 22:39:35 +0200 Subject: [PATCH 17/24] Upgrade to 1.6.0 --- README.md | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11a58fe..683eb05 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-1.5.1-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-1.6.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/manifest.json b/manifest.json index 830f27f..009b5df 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "1.5.1", + "version": "1.6.0", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL v3.0", "maintainer": { From a92d2b7f30eca840006c11eb6e03475c50ba2326 Mon Sep 17 00:00:00 2001 From: Nemsia Date: Mon, 11 Sep 2017 22:49:53 +0200 Subject: [PATCH 18/24] Remove prepare_for_foreign_keys task on upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6726f92..4e84b0d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,7 +73,7 @@ pushd ~/live bin/bundle install yarn install --pure-lockfile # For 1.4.1 -> 1.4.2 migration prepare_for_foreign_keys is needed -RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys +# RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate From 502e75555bd83719746ca5c09fc18ce836cd4cb8 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 11 Oct 2017 18:59:24 +0200 Subject: [PATCH 19/24] Upgrade to ruby 2.5.2 for release 2.0 --- scripts/upgrade | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 11f9966..0c818cd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,6 +66,23 @@ fi # add additional package for release 1.4 ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev +# Install ruby 2.5.2 for release 2.0 +sudo su - $app < Date: Wed, 11 Oct 2017 21:22:47 +0200 Subject: [PATCH 20/24] Fix to 2.4.2 --- scripts/upgrade | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0c818cd..0832e99 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,19 +66,21 @@ fi # add additional package for release 1.4 ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev -# Install ruby 2.5.2 for release 2.0 +# Install ruby 2.4.2 for release 2.0 sudo su - $app < Date: Wed, 11 Oct 2017 21:26:13 +0200 Subject: [PATCH 21/24] Fix rbenv install error --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0832e99..7384e42 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,7 +70,7 @@ ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libi sudo su - $app < Date: Wed, 11 Oct 2017 21:30:51 +0200 Subject: [PATCH 22/24] Remove duplicated bundle install and yarn install --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7384e42..682df3e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,14 +82,14 @@ sudo su - $app < 1.4.2 migration prepare_for_foreign_keys is needed # RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys RAILS_ENV=production bundle exec rails assets:clean From 1b737b0c6423b734a9e50e5d13e9b4586478067e Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 11 Oct 2017 21:43:29 +0200 Subject: [PATCH 23/24] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index cb4adb5..217ca34 100644 --- a/scripts/install +++ b/scripts/install @@ -102,9 +102,10 @@ CLONECOMMANDS # Switch branch to tagged release cd $final_path/live +version=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | grep tag_name | cut -d\" -f4) sudo su - $app < Date: Wed, 11 Oct 2017 21:44:36 +0200 Subject: [PATCH 24/24] Update upgrade --- scripts/upgrade | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e734e97..0c469bb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,9 +50,10 @@ PULLCOMMANDS # Switch branch to tagged release cd $final_path/live +version=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | grep tag_name | cut -d\" -f4) sudo su - $app < 1.4.2 migration prepare_for_foreign_keys is needed -# RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate