diff options
| author | nemsia <nemsia@nemsia.org> | 2018-06-12 23:27:25 +0200 |
|---|---|---|
| committer | nemsia <nemsia@nemsia.org> | 2018-06-12 23:27:25 +0200 |
| commit | fae0fac957846c3bda3c9a711612a67053b0cfff (patch) | |
| tree | 11d63d1cc387ea9ad3552bffb70fe50df16f9794 | |
| parent | 4d552172643c981e10490e21e4c343baad5a933e (diff) | |
| parent | 29c54691fe2d7f105b346ac23d38b86b3c187f3a (diff) | |
| download | mastodon_ynh-fae0fac957846c3bda3c9a711612a67053b0cfff.tar.gz mastodon_ynh-fae0fac957846c3bda3c9a711612a67053b0cfff.tar.bz2 mastodon_ynh-fae0fac957846c3bda3c9a711612a67053b0cfff.zip | |
Merge branch 'YunoHost-Apps-testing-2.4' into testing-2.4
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | conf/app-mastodon.src | 4 | ||||
| -rw-r--r-- | manifest.json | 2 | ||||
| -rw-r--r-- | scripts/backup | 6 | ||||
| -rw-r--r-- | scripts/install | 6 | ||||
| -rw-r--r-- | scripts/remove | 5 | ||||
| -rw-r--r-- | scripts/restore | 10 | ||||
| -rw-r--r-- | scripts/upgrade | 6 |
8 files changed, 28 insertions, 15 deletions
@@ -1,10 +1,10 @@ # Mastodon for YunoHost -[](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) -[](https://github.com/YunoHost/yunohost) +[](https://github.com/YunoHost/yunohost) [](https://github.com/YunoHost-Apps/mastodon_ynh/issues) [](https://install-app.yunohost.org/?app=mastodon) diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index 84b72fb..61c7260 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0.tar.gz -SOURCE_SUM=3d4904f30c28591333b1cf4c03173849dd6983ab00685f61e50e594160c672ee +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.1.tar.gz +SOURCE_SUM=d90b573e16359f63f7b2834f1078ecfdd7d78cd5a26acd8293a314dd2b6ff1ec SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 3e6e9b4..11c277b 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": "2.4.0", + "version": "2.4.1", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/backup b/scripts/backup index 0846afe..f32dfdd 100644 --- a/scripts/backup +++ b/scripts/backup @@ -33,7 +33,11 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) final_path=$(ynh_app_setting_get "$app" final_path) -db_name=$(ynh_sanitize_dbid "$app") +db_name=$(ynh_app_setting_get "$app" db_name) +if [ -z "$db_name" ]; then + db_name="${app}_production" + ynh_app_setting_set "$app" db_name "$db_name" +fi #================================================= # STANDARD BACKUP STEPS diff --git a/scripts/install b/scripts/install index cbce4e3..90a8dfc 100644 --- a/scripts/install +++ b/scripts/install @@ -124,8 +124,10 @@ ynh_install_app_dependencies \ ynh_psql_test_if_first_run db_user=$(ynh_sanitize_dbid "$app") -db_name=$(ynh_sanitize_dbid "$app") +db_name="${app}_production" +db_name=$(ynh_sanitize_dbid "$db_name") db_pwd=$(ynh_string_random) +ynh_app_setting_set $app db_name $db_name ynh_app_setting_set $app db_pwd $db_pwd ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd" @@ -220,7 +222,7 @@ sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "${fin $final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet yarn install --production --no-progress --non-interactive --silent echo "SAFETY_ASSURED=1">> .env.production - RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet + RAILS_ENV=production $final_path/live/bin/bundle exec rails db:setup --quiet RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet INSTALL ) diff --git a/scripts/remove b/scripts/remove index e939908..470455e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,8 +22,11 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) db_name=$(ynh_app_setting_get "$app" db_name) +if [ -z "$db_name" ]; then + db_name="${app}_production" + ynh_app_setting_set "$app" db_name "$db_name" +fi db_user=$(ynh_sanitize_dbid "$app") -db_name=$(ynh_sanitize_dbid "$app") final_path=$(ynh_app_setting_get "$app" final_path) #================================================= diff --git a/scripts/restore b/scripts/restore index a800966..b41b9cd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -89,10 +89,10 @@ fi # Install source.list debian package backports & yarn if [ "$(lsb_release --codename --short)" == "jessie" ]; then - cp ../conf/backports.list /etc/apt/sources.list.d/ + cp ../conf/apt_backports.list /etc/apt/sources.list.d/ fi curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -cp ../conf/yarn.list /etc/apt/sources.list.d/ +cp ../conf/apt_yarn.list /etc/apt/sources.list.d/yarn.list ynh_package_update # Install de Node.js @@ -124,7 +124,11 @@ ynh_install_app_dependencies \ # Restore PostgreSQL database db_user=$(ynh_sanitize_dbid "$app") -db_name=$(ynh_sanitize_dbid "$app") +db_name=$(ynh_app_setting_get "$app" db_name) +if [ -z "$db_name" ]; then + db_name="${app}_production" + ynh_app_setting_set "$app" db_name "$db_name" +fi db_pwd=$(ynh_app_setting_get "$app" db_pwd) ynh_psql_test_if_first_run diff --git a/scripts/upgrade b/scripts/upgrade index 3858ee8..d50b729 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers # See comments in install script app=$YNH_APP_INSTANCE_NAME -db_name=$app +db_name=$(ynh_app_setting_get "$app" db_name) # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) @@ -31,7 +31,7 @@ path_url="/" # If db_name doesn't exist, create it if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid "$app") + db_name="${app}_production" ynh_app_setting_set "$app" db_name "$db_name" fi @@ -115,7 +115,7 @@ ynh_setup_source "$final_path/.rbenv/plugins/ruby-build" "app-ruby-build" # Install ruby 2.5.1 ( - exec_as "$app" $final_path/.rbenv/bin/rbenv install 2.5.1 || true + exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.1 || true exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.1 || true exec_as "$app" $final_path/.rbenv/versions/2.5.1/bin/ruby -v ) |
